Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 954 Bytes

linked-list.md

File metadata and controls

12 lines (11 loc) · 954 Bytes

Linked List

  • Given a linked list, in addition to the next pointer, each node has a child pointer that can point to a separate list. With the head node, flatten the list to a single-level linked list.
  • Reverse a singly linked list. Implement it recursively and iteratively.
  • Convert a binary tree to a doubly circular linked list.
  • Implement an LRU cache with O(1) runtime for all its operations.
  • Check distance between values in linked list.
  • A question involving an API's integration with hash map where the buckets of hash map are made up of linked lists.
  • Given a singly linked list (a list which can only be traversed in one direction), find the item that is located at 'k' items from the end. So if the list is a, b, c, d and k is 2 then the answer is 'c'. The solution should not search the list twice.
  • How can you tell if a Linked List is a Palindrome?