Skip to content

Tag Archives: doubly linked list

Given a doubly linked list having exactly one of the node pointing to a random node in the list, the task is to correct this… Read More
Given a binary tree and an integer K, the task is to remove all the nodes which are multiples of K from the given binary… Read More
Prerequisite:   XOR Linked List – A Memory Efficient Doubly Linked List | Set 1 XOR Linked List – A Memory Efficient Doubly Linked List |… Read More
Introduction to Singly linked list : A singly linked list is a set of nodes where each node has two fields ‘data’ and ‘link’. The… Read More
Given a doubly linked list ‘L’ and an array ‘refArr’ of references to the nodes of the doubly linked list ‘L’. Array ‘refArr’ does not… Read More
Given a doubly linked list containing N nodes. The task is to find the product of all prime nodes.Example:   Input: List = 15 <=> 16… Read More
Given two doubly linked lists. The task is to find the total number of common nodes in both the doubly linked list.Examples:   Input : list… Read More
Given a sorted doubly linked list of positive distinct elements, the task is to find pairs in the doubly linked list whose product is equal… Read More
Given a doubly-linked list containing N nodes and given a number K. The task is to find the product of all such nodes which are… Read More
Design a data structure for LRU Cache. It should support the following operations: get and set. get(key) – Get the value (will always be positive)… Read More
Given a doubly-linked list containing N nodes, the task is to delete all nodes from the list which are divisible by K. Examples:  Input: List… Read More
Given a doubly linked list containing N nodes, the task is to delete all nodes from the list which are prime.Examples:   Input: List = 15… Read More
Given a doubly-linked list of positive integers. The task is to print the given doubly linked list data in reverse order.  Examples:  Input: List =… Read More
Given a doubly linked list and an array with only odd values. Both are of equal size N. The task is replace all node which… Read More

Start Your Coding Journey Now!