# Category Archives: Linked Lists

## Squareroot(n)-th node in a Linked List

Given a Linked List, write a function that accepts the head node of the linked list as a parameter and returns the value of node… Read More »

## Recursive selection sort for singly linked list | Swapping node links

Given a singly linked list containing n nodes. The problem is to sort the list using recursive selection sort technique. The approach should be such… Read More »

## Sort a k sorted doubly linked list

Given a doubly linked list containing n nodes, where each node is at most k away from its target position in the list. The problem… Read More »

## Sort the biotonic doubly linked list

Sort the given biotonic doubly linked list. A biotonic doubly linked list is a doubly linked list which is first increasing and then decreasing. A… Read More »

## Remove duplicates from an unsorted doubly linked list

Given an unsorted doubly linked list containing n nodes. The problem is to remove duplicate nodes from the given list. Examples: Recommended: Please try your… Read More »

## Delete all occurrences of a given key in a doubly linked list

Given a doubly linked list and a key x. The problem is to delete all occurrences of the given key x from the doubly linked… Read More »

## Remove duplicates from a sorted doubly linked list

Given a sorted doubly linked list containing n nodes. The problem is to remove duplicate nodes from the given list. Examples: Recommended: Please try your… Read More »

## Merge k sorted linked lists | Set 2 (Using Min Heap)

Given k sorted linked lists each of size n, merge them and print the sorted output. Examples: Input: k = 3, n = 4 list1… Read More »

## Count triplets in a sorted doubly linked list whose sum is equal to a given value x

Given a sorted doubly linked list of distinct nodes(no two nodes have the same data) and a value x. Count triplets in the list that… Read More »

## Skip List | Set 3 (Searching and Deletion)

In previous article Skip List | Set 2 (Insertion) we discussed the structure of skip nodes and how to insert an element in the skip… Read More »

## Delete a Doubly Linked List node at a given position

Given a doubly linked list and a position n. The task is to delete the node at the given position n from the beginning. Initial… Read More »

## Insert value in sorted way in a sorted doubly linked list

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

## Skip List | Set 2 (Insertion)

We have already discussed the idea of Skip list and how they work in Skip List | Set 1 (Introduction). In this article, we will… Read More »

## Count pairs from two linked lists whose sum is equal to a given value

Given two linked lists(can be sorted or unsorted) of size n1 and n2 of distinct elements. Given a value x. The problem is to count… Read More »

## Find the sum of last n nodes of the given Linked List

Given a linked list and a number n. Find the sum of last n nodes of the linked list. Constraints: 0 <= n <= number… Read More »