Grab Online coding inteview round
Anonymous User
1683

Sort a Linked list in increasing order by considering two nodes as two digit number

4 <= n <= 1000

The length of the linked list is always even .

Eg -

Input
1->3->4->2->1->2

Output
1->2->1->3->4->2

Explanation -> 12 >13 > 42

Input
1->3->0->3

Output
0->3->1->3

Comments (6)
No comments yet.