Skip to content

Category Archives: Linked List

Given a Singly linked list, the task is to count the number of nodes whose data value is equal to its frequency.  Examples:  Input: Linked… Read More
Given a circular singly linked list containing N nodes, The task is to find the sum and product of all the nodes from the list… Read More
Given a number K, the task is to create the circular linked list structure with four pointers that are next, previous, up, and down Using… Read More
Given a Linked List, the task is to find the largest and second largest value in a Linked List.Example:   Input: LL = 10 -> 15… Read More
Write a program that checks whether a given Linked List contains a loop and if a loop is present then returns the count of nodes… Read More
Given a 2D matrix, the task is to convert it into a doubly-linked list with four pointers that are next, previous, up, and down, each… Read More
Given a singly linked list containing N nodes, the task is to perform the following operations on the Fibonacci nodes present in it:  Print all… Read More
Given a singly linked list containing N nodes, the task is to find the sum and product of all the nodes from the list whose… Read More
Given a circular singly linked list containing N nodes, the task is to remove all the nodes from the list which contains Fibonacci data values.Examples:  … Read More
Given two Linked List, the task is to create a Linked List to store the difference of Linked List 1 with Linked List 2, i.e.… Read More
Given a doubly linked list containing N nodes, the task is to remove all the nodes from the list which contains Fibonacci numbers.Examples:  Input: DLL… Read More
Given two Linked Lists L1 and L2, the task is to generate a new linked list with no common elements from the given two linked… Read More
Given a linked list, the task is to find the sum of all subsets of a linked list.Examples:   Input: 2 -> 3 -> NULL Output: 10 Explanation: All… Read More
Given a Linked List, check if the linked list has a loop or not.There are various methods shown here: Detect Cycle in Linked List Example  … Read More
Prerequisite: Operator Overloading in C++, Linked List in C++ C++ comes with libraries that provide ways for performing Input and Output. In C++, Input and… Read More