## Delete a node in a Doubly Linked List

Doubly Link List Set 1| Introduction and Insertion Write a function to delete a given node in a doubly linked list. (a) Original Doubly Linked… Read More »

## Pairwise swap elements of a given linked list

Given a singly linked list, write a function to swap elements pairwise. Input : 1->2->3->4->5->6->NULL Output : 2->1->4->3->6->5->NULL Input : 1->2->3->4->5->NULL Output : 2->1->4->3->5->NULL Input… Read More »

## Move last element to front of a given Linked List

Write a function that moves the last element to the front in a given Singly Linked List. For example, if the given Linked List is… Read More »

## Practice questions for Linked List and Recursion

Assume the structure of a Linked List node is as follows. filter_none edit close play_arrow link brightness_4 code struct Node {   int data;   struct Node… Read More »

## Split a Circular Linked List into two halves

Original Linked List Result Linked List 1 Result Linked List 2 If there are odd number of nodes, then first list should contain one extra.… Read More »

## Reverse a Doubly Linked List

Write a C function to reverse a given Doubly Linked List See below diagrams for example. (a) Original Doubly Linked List (b) Reversed Doubly Linked… Read More »

## Remove duplicates from an unsorted linked list

Write a removeDuplicates() function which takes a list and deletes any duplicate nodes from the list. The list is not sorted. For example if the… Read More »

## Remove duplicates from a sorted linked list

Write a function which takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed… Read More »

## Print reverse of a Linked List without actually reversing

Given a linked list, print reverse of it using a recursive function. For example, if the given linked list is 1->2->3->4, then output should be… Read More »

## 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 »