## Detect start of a loop in linked list

Problem : Given a linked list, implement an algorithm which returns the node at the beginning of the loop. This post is a follow-up of – JavaScript Linked List Example – Detect a loop...

## Detect a loop in cyclic/circular linked list

Logic : If a linked list has a cycle then no node has a null as next pointer. A simple loop exists when p1.next.next !== null as shown below. While iterating over the linked...

## Given the binary tree create linked lists of the nodes at the same level

Problem description : Convert a given binary tree to a linked list of all the nodes at each depth (if you have a binary tree with depth D, you’ll have D linked lists). Logic...

## Delete a node from a linked list in javascript

Problem description : Write a method to remove a node from a linked list. Input: A linked list Output: A linked list with one less node Logic : Iterate through the list, if you...

## Remove duplicates from an unsorted linked list

Problem description : Write a method to remove duplicates from an unsorted linked list. Input : A linked list Output : A linked list with unique elements This post is a follow-up of JavaScript...