GeeksforGeeks » Interview Questions
write program for following?
(4 posts)-
1 given a linked list 1 2 3 4 5 6 7 8 9 . if given an input 3 u hav to sort it like 7 8 9 4 5 6 1 2 3. in given 2 u hav to sort it like 8 9 6 7 4 5 2 3 1 0.
-
1) Use the method discussed @ http://www.geeksforgeeks.org/archives/8014
2) Reverse the list obtained after step 1. See http://www.geeksforgeeks.org/archives/860 for reversing the list -
Can you be more specific about the input and output for case 2 ?? I can not understand the output
8 9 6 7 4 5 2 3 1 0 from where did that '0' come ?? Is it in the input list ?? -
@karthik:tanq:)
Reply
You must log in to post.