##
Find modular node in a linked list
August 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 »

Quick Links for Linked List

Quizzes |

Videos on Linked List |

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

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

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

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

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

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

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

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

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

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

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

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 »

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 »

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 »