Linked List Interview Questions


   1)  How do you reverse a singly linked list? How do you reverse a doubly linked list? Write a 
         C program to do the same.
   2)  Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?
   3)  How do you sort a linked list? Write a C program to sort a linked list.
   4)  How to declare a structure of a linked list?
   5)  Write a C program to implement a Generic Linked List.
   6)  How do you reverse a linked list without using any C pointers?
  7)   How would you detect a loop in a linked list? Write a C program to detect a loop in a 
         linked list.
  8)  How do you find the middle of a linked list? Write a C program to return the middle of a 
        linked list.
  9)  If you are using C language to implement the heterogeneous linked list, what pointer type 
       will you use?
 10) How to compare two linked lists? Write a C program to compare two linked lists.
 11) How to create a copy of a linked list? Write a C program to create a copy of a linked list.
 12) Write a C program to free the nodes of a linked list.
 13) Can we do a Binary search on a linked list?
 14) Write a C program to return the nth node from the end of a linked list.
 15) How would you find out if one of the pointers in a linked list is corrupted or not?
 16) Write a C program to insert nodes into a linked list in a sorted fashion.
 17) Write a C program to remove duplicates from a sorted linked list.
 18) How to read a singly linked list backwards?
 19) How can I search for data in a linked list?

No comments:

Post a Comment