I am listing here selected interview questions for linked-list
Scope
Lateral Thinking points -
Easy
Medium
Advanced
Tough
Scope
- Singly linked list
- Doubly linked list
- Unrolled linked list
- Skip List
- Linked Array List
- Memory efficient linked lists
Lateral Thinking points -
- Compare linked list with array using aspects on time and space . Which one to use in which situation ?
- Recursive or iterative solution
- Linear/Binary Searching
- Indexing using hash-table /map
- Two runner technique
- Brute force using nested loops.
- Time , Space trade-off
- Number of scans of linkedlist
- Cost of saving next and or prev pointers
Easy
- Implement linked list with operations like add , delete , put using index position also implement addFirst , addLast , deleteFirst , deleteLast.
- Implement stack using linkedlist.
- Implement queue using linkedlist .
- Reverse linkedlist .
- Traverse circular linked list .
- Remove duplicated from linkedlist.
Medium
- Find kth node from end .
- Find middle of linkedlist
- Find cycles in linkedlist and find entry point of loop.
- Insert node in sorted linked list
- find the merge point of two linkedlist which have different length.
- Merge two sorted linked lists.
- Implement Josephus Circle using linkedlist
- Delete middle of linked list , you have access to middle element only.
Advanced
- Create linkedlist with O(1) access time.
- Reverse k blocks of linked list
- Reverse each pair of linked list
- Split circular linkedlist
- Sort linked list using insertion sort .
- Sort linked list using merge sort .
- Segregate linked list (data in link is integer) in two list of even and odd numbers.
- Add/Subtract/Multiply/Divide two linked list which represents number .
- Partition linked list around the pivot value .
- Check whether two linked lists are palindrome.
Tough
- Implement CRUD on skiplist
- Implement CRUD on unrolled linked list
- Implement CRUD on Linked-Array List
- Implement LRU/MRU cache
No comments:
Post a Comment