- write a code to remove duplicates from unsorted link list. How would you solve it if temp buffer is not given.
- write algo to find nth to last element of singly link list.
- implement the algorithm to delete a node in the middle of a singly link list given only access to that node.
- write a algo to partition a linked list around a value such that all nodes less than x come before it and all nodes with value greater than x comes after it.
- suppose number are represented by singly linked list in reverse order. Eg . 123 is represented as 3->2->1. Write a function which could add these numbers and represent in link list.
- suppose number are represented by singly linked list in same order. Eg . 123 is represented as 1->2->3. Write a function which could add these numbers and represent in link list.
- Detect the loop in the link list. Also detect the loop node. Eg . a->b->c->d->e->b. E is pointing to b so there is loop in link list.
- Implement a method to check if link list is palindrome.
Tuesday, April 2, 2013
Link List Algorithm Questions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment