Professional Documents
Culture Documents
Problems+ +Linked+Lists
Problems+ +Linked+Lists
Aneesh,Amruth,Pradeep,Ravindra
1. Write a pseudo code to reverse the elements of a linked list, given the pointer to the first
node?
2. Find the nth element from the end of the linked list, given the pointer to the first element of
the list?
3. How do you determine if there is a loop in a linked list? Write a pseudo code for the same?
4. If two linked lists are merged at a node, how do you determine the node?
5. How do you determine the middle element of the linked list? Write a code for the same
which returns the middle element of the linked list?
7. Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?
8. Given a linked list having positive integers, divide it into two separate linked list containing
even and odd integers. Modify the same linked list?
9. Each digit of a number is stored in a node of a linked list, given two linked lists of any length,
write a program to add the lists?
10. A string is represented using a linked list? How do you determine if it is a palindrome or not
in O(n)?