## Write a function to get the intersection point of two Linked Lists

There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked to… Read More »

## Given a linked list which is sorted, how will you insert in sorted way

Given a sorted linked list and a value to insert, write a function to insert the value in a sorted way. Initial Linked List Linked… Read More »

## Memory efficient doubly linked list

Asked by Varun Bhatia. Question: Write a code for implementation of doubly linked list with use of single pointer in each node. Solution: This question… Read More »

## Clone a linked list with next and random pointer | Set 1

You are given a Double Link List with one pointer of each node pointing to the next node just like in a single link list.… Read More »

## The Great Tree-List Recursion Problem.

Asked by Varun Bhatia. Question: Write a recursive function treeToList(Node root) that takes an ordered binary tree and rearranges the internal pointers to make a… Read More »

## Function to check if a singly linked list is palindrome

Given a singly linked list of characters, write a function that returns true if the given list is a palindrome, else false. Recommended: Please solve… Read More »

## Detect loop in a linked list

Given a linked list, check if the linked list has loop or not. Below diagram shows a linked list with a loop. Recommended: Please solve… Read More »

Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by… Read More »

## Java Program for Reverse a linked list

Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by… Read More »

## Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?

A simple solution is to traverse the linked list until you find the node you want to delete. But this solution requires pointer to the… Read More »

## Write a function that counts the number of times a given int occurs in a Linked List

Given a singly linked list and a key, count number of occurrences of given key in linked list. For example, if given linked list is… Read More »

## Write a function to delete a Linked List

Algorithm For C/C++: Iterate through the linked list and delete all the nodes one by one. Main point here is not to access next of… Read More »

## Program for n’th node from the end of a Linked List

Given a Linked List and a number n, write a function that returns the value at the n’th node from the end of the Linked… Read More »

## Find the middle of a given linked list in C and Java

Given a singly linked list, find middle of the linked list. For example, if given linked list is 1->2->3->4->5 then output should be 3. If… Read More »

## Given only a pointer/reference to a node to be deleted in a singly linked list, how do you delete it?

Given a pointer to a node to be deleted, delete the node. Note that we don’t have pointer to head node. Recommended: Please solve it… Read More »