Algorithm Deep copy a Linked List with random pointers If I ask you to deep copy a Linked List, it will be very simple but if the list contains random pointer, how would you do? In this post, I am providing both w/ and w/o hashmap solution. Read on to find out!
Algorithm Reverse nodes in k-group in Linked List We have learned about reversing the whole Linked List, reversing nodes from m to n in a Linked List, and now, we need to reverse nodes in k-group. Though the difficulty is set to hard, but the concept still applies. Read on to master it!
Algorithm Sorting a Linked List Can you sort a Linked List in O(nlogn) time without allocating new space? Sorting list is very similar to sorting array, you use divide and conquer method to sort and merge the lists. Read on to find out more!
Algorithm Can you reorder a Linked List? We all know how to find the middle node of a linked list, or reverse a linked list, or even merge two lists together. In this question, you will be doing all these at once! Read on to find out how!
Algorithm Can you rotate a Linked List by k places? Given a linked list, can you rotate the list by k places? The challenge is to reconnect the rotated list with the unrotated list. Read on to find out how!
Algorithm Find the cycle in a Linked List Can you find out if a linked list has cycle in it? If so, can you find out the node where the cycle begins? Read on to find out!
Algorithm Find the intersection of two Linked Lists If I am giving you two linked lists, will you be able to find where their intersection node is? Read on if you are interested!
Algorithm Reverse a Linked List Reverse a Linked List is the one of the most common operations on Linked Lists. Knowing how to reverse a linked list can almost solve 80% of linked list problems. So let's master it!
Algorithm Swap nodes in pairs? Have you ever wondered how swapping two nodes in Linked List works? If you do, please read on!