Unable to pass all test cases

Mam im unable to pass all test cases .Also how can i implement this question using inbuild linked list of java.
please provide me the code for the same using inbuild linked list class of java.

the error is that your code is not able to maintain the relative order of the numbers in which they have arrived.
like for this test case:
6
2 4 1 3 6 8
output should be: 1 3 2 4 6 8

Also to implement it using inbuilt class of ll is easy. You can use the functions such as add remove etc directly.

yes mam but im unable to implement this question as i m swaping the data .Can u please provide me the code so that i can understand the syntax of using inbuilt class of java