An ordinary Doubly Linked List requires space for two address fields to store the addresses of previous and next nodes. It is represented as follows… Read More
Write a function detectAndRemoveLoop() that checks whether a given Linked List contains a loop and if the loop is present then removes the loop and… Read More
Given a Linked List of integers, write a function to modify the linked list such that all even numbers appear before all the odd numbers… Read More
Given a singly linked list, remove all the nodes which have a greater value on the right side.  Examples: a) The list 12->15->10->11->5->6->2->3->NULL should be changed… Read More
Given a linked list, write a function to reverse every alternate k nodes (where k is an input to the function) in an efficient way.… Read More
Difficulty Level: Rookie Write a C function to insert a new value in a sorted Circular Linked List (CLL). For example, if the input CLL is… Read More
Arrays store elements in contiguous memory locations, resulting in easily calculable addresses for the elements stored and this allows faster access to an element at… Read More
Given a linked list, write a function to reverse every k nodes (where k is an input to the function).  Example:  Input: 1->2->3->4->5->6->7->8->NULL, K =… Read More
Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as… Read More
Two Linked Lists are identical when they have the same data and the arrangement of data is also the same. For example, Linked lists a… Read More
Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which… Read More
Write a function AlternatingSplit() that takes one list and divides up its nodes to make two smaller lists ‘a’ and ‘b’. The sublists should be… Read More
Given a Singly Linked List, starting from the second node delete all alternate nodes of it. For example, if the given linked list is 1->2->3->4->5… Read More
Given two lists sorted in increasing order, create and return a new list representing the intersection of the two lists. The new list should be… Read More
Pre-requisite: Doubly Link List Set 1| Introduction and Insertion Write a function to delete a given node in a doubly-linked list. Original Doubly Linked List  Recommended… Read More