## Design a data structure for LRU Cache

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 »

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:… 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 =… 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 »

Given a doubly linked list containing N nodes, the task is to delete all the even nodes from the list. Examples: Input: Initial List =… Read More »

Given a doubly linked list containing N nodes and given a number K. The task is to find the sum of all such nodes which… Read More »

Given a doubly linked list containing N nodes and a number K, the task is to delete all the nodes from the list that are… Read More »

Pre-requisite: Convert an Array to a Circular Doubly Linked List, Doubly Circular Linked List Given a Doubly circular linked list. The task is to find… Read More »

The entire process consisted of 5 rounds: 1 online coding, 1 debugging, 2 Technical and 1 HR/System Design Round. The minimum criteria for the online… Read More »

Prerequisite: Insert Element Circular Doubly Linked List. Convert an Array to a Circular Doubly Linked List. Given the start pointer pointing to the start of… Read More »

The problem is to reverse the given doubly circular linked list. Examples: Input: Output: Recommended: Please try your approach on {IDE} first, before moving on… Read More »

Prerequisite: Doubly Linked list, Circular Linked List, Circular Doubly Linked List Given an array of N elements. The task is to write a program to… Read More »

Given a binary tree containing n distinct numbers and a value x. The problem is to count pairs in the given binary tree whose sum… Read More »

Sort the given doubly linked list using bubble sort. Examples: Input : 5 4 3 2 1 Output : 1 2 3 4 5 Input… Read More »