Reverse a Linked List in groups of given sizeJune 14, 2010 Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Example: Algorithm: reverse(head, k)
Time Complexity: O(n) where n is the number of nodes in the given list. |
Labels
- Array (2)
- C (27)
- c++ (3)
- hashing 1 (1)
- Java (6)
- LINUX (1)
- PERL (2)
- Programing_questions (14)
- PUZZLE (1)
- STRUCTURE PADDING (3)
- Testing and Debugging (2)
Friday, July 16, 2010
Reverse a Linked List in groups of given size
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment