Skip to content

Tag Archives: Tortoise-Hare-Approach

Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given a linked list containing n nodes. The problem is to insert a new node with data x at the middle of the list. If… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given a singly linked list, find middle of the linked list and set middle node of the linked list at beginning of the linked list. Examples:… Read More
Given a singly linked list, delete the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the linked list… Read More
Given a singly linked list, delete the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the linked list… Read More
Given a singly linked list, delete the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the linked list… Read More
Given a linked list, check if the linked list has loop or not. Below diagram shows a linked list with a loop.   The following are… Read More
Given a linked list, check if the linked list has loop or not. Below diagram shows a linked list with a loop.   Solution: Floyd’s Cycle-Finding… Read More
Given a singly linked list, delete the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the linked list… Read More

Start Your Coding Journey Now!