Category: Linked List

0

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...

0

Reverse a singly linked list

Problem description : Write a function to reverse a singly linked list. Input : A linked list Output : A linked list Logic : Iterate through linked list with three-pointers previous, current, next. While...