Closed anshuman725 closed 2 years ago
@SarthakKeshari kindly issue me this problem
@anshuman725, May I know, is this question from GeeksForGeeks?
@anshuman725, May I know, is this question from GeeksForGeeks?
@SarthakKeshari it's from the course of Coding Ninja's, But we can find this question on GeeksForGeeks as Well.
@anshuman725, Kindly mention all the links. It will help the learners visiting your code to get the references
@SarthakKeshari Done!
can multiple people solve same issue?
can multiple people solve same issue?
@diwakar1998, No, only "admin-choice" questions can be solved by multiple people.
@anshuman725, Kindly add your solution to "GeeksForGeeks" folder. Deadline - 13/10/2021
Enter your question -
For a given singly linked list of integers, arrange the elements such that all the even numbers are placed after the odd numbers. The relative order of the odd and even terms should remain unchanged.
Test Cases-
Sample Input 1 : 1 1 4 5 2 -1
Sample Output 1 : 1 5 4 2
Sample Input 2 : 2 1 11 3 6 8 0 9 -1 10 20 30 40 -1
Sample Output 2 : 1 11 3 9 6 8 0 10 20 30 40
Enter link to the question(if question belongs to any online platform) -
Link to Question
Tags for the question(eg - Array, Basic, Stack, etc.) -
LinkedList