## Find modular node in a linked listAugust 9, 2017

Given a singly linked list and a number k, find the last node whose n%k == 0, where n is the number of nodes in… Read More »

## Find the fractional (or n/k – th) node in linked listAugust 6, 2017

Given a singly linked list and a number k, write a function to find the (n/k)-th element, where n is the number of elements in… Read More »

## Reverse a Linked List in groups of given size | Set 2July 19, 2017

Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Examples: Inputs: 1->2->3->4->5->6->7->8->NULL and k… Read More »

## Count nodes in Circular linked listJuly 16, 2017

Given a circular linked list, count number of nodes in it. For example output is 5 for below list. Recommended: Please try your approach on… Read More »

## Find length of loop in linked listJuly 15, 2017

Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop.… Read More »

## An interesting method to print reverse of a linked listJuly 13, 2017

We are given a linked list, we need to print the linked list in reverse order. Examples: Input : list : 5-> 15-> 20-> 25… Read More »

## Squareroot(n)-th node in a Linked ListJuly 12, 2017

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 linksJuly 11, 2017

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 listJuly 10, 2017

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 listJuly 9, 2017

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)July 6, 2017

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 »