Skip to content

LinkList

Mission Peace edited this page Oct 11, 2016 · 5 revisions
  1. Add two numbers represented by link list - AddNumberRepresentedByLinkList.java
  2. Create a copy of a link list in which one pointer points to next node while other pointer can point to any node in the list - CopyLinkListWIthArbitPointer.java
  3. Given a linklist, delete m nodes after every n nodes - DeleteNAfterMNodes.java
  4. Delete nodes which has greater value on right side - DeleteNodeWithGreaterValueOnRight.java
  5. Given a linklist in which down pointer could point to another linklist and this happens recursively, flatten this linklist - FlattenLinkList.java
  6. Implement a LRU cache using linklist and map - LRUCache.java
  7. Basic link list structure - LinkList.java
  8. Sort linklist using merge sort - MergeSortLinkList.java
  9. Quick sort linklist - QuickSortSingleLinkList.java
  10. Remove duplicates from a sorted linklist - RemoveDuplicatesSortedList.java
  11. Given a linklist and k,reverse alternate k nodes in the linklist - ReverseAlternateKNodes.java
  12. Given a linklist, reverse alternate nodes and append it at the end - ReverseAlternateNodeAndAppendAtEnd.java
  13. Reverse every k nodes in a linklist - ReverseKNodes.java
  14. Sort a nearly sorted linklist - SortNearlySortedList.java
  15. Insert into sorted circular linklist - SortedCircularLinkList.java
  16. Given a sorted linklist, convert it into a balanced binary search tree - SortedLLToBalancedBST.java
  17. Stack with also support find/delete middle operation - StackWithLinkListMiddleOperation.java
  18. Given three linklist and a sum, find a triplet from each list which adds up to sum - TripletToSumInLinkList.java
  19. Insertion sort for link list - InsertionSortLinkList.java
  20. Double link list - DoubleLinkList.java
  21. Given two nodes of double link list swap them - SwapTwoNodesInDoubleLL.java
  22. Given a linklist, return true if elements form a palindrome or not - LinkListIsPalindrome.java
  23. Multiply two numbers given in form of linklist. Result should also be linklist - MultiplyTwoNumbersLinkList.java
  24. Convert linklist to complete binary tree - LinkListToCompleteBinaryTree.java
  25. Given a linklist, find middle element of the linklist - MiddleElementOfLinkList.java
  26. Shuffle merge linklist - ShuffleMerge.java
  27. Given a linked list of co-ordinates where adjacent points either form a vertical line or a horizontal line. Delete points from the linked list which are in the middle of a horizontal or vertical line.RemoveMiddleElementsOfLineSegment.java
  28. Find if there is a loop in linklist LoopInLinkList.java
  29. Given two sorted linked lists, construct a linked list that contains maximum sum path from start to end. The result list may contain nodes from both input lists. MergeForLargestSum.java
  30. Given sorted linklist, delete all nodes which are duplicate - DeleteDuplicateNodes.java
  31. Flatten 2D list - Flatten2DList.java
  32. Rotate list - RotateList.java
Clone this wiki locally