Skip to content

Category Archives: Linked List

An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and elements… Read More
Given a root of the Binary Tree and head of the Linked List, the task is to check if all the elements of the linked… Read More
Given root of the Binary Tree T and a linked list L, the task is to find the direction of path followed from root such… Read More
Circular Doubly Linked List has properties of both Doubly Linked List and Circular Linked List in which two consecutive elements are linked or connected by… Read More
Given a Matrix grid[][] of size NxM where N is number of rows and M is number of columns. The task is to form a… Read More
Given a circular linked list, the task is to check whether the given list has duplicates or not. Example: Input: list = {5, 7, 5,… Read More
Given a linked list, write a function to reverse every k node (where k is an input to the function). Examples:   Inputs:  1->2->3->4->5->6->7->8->NULL, k =… Read More
Multilevel Linked ListMultilevel Linked List is a 2D data structure that comprises several linked lists and each node in a multilevel linked list has a… Read More
Given a linked list of N nodes where each node represents digits of a number and a single-digit number M, the task is to multiply… Read More
Given a singly linked list, the task is to split the given linked list into exactly three parts such that the maximum difference between the… Read More
The linked list stores data in sequential storage, like arrays. Though the data are stored sequentially, the memory locations are not contiguous.Unlike an array, the… Read More
Given a pre define size of a list N and an array Arr. The task is to implement Least Recently Used(LRU) algorithm using Double Linked… Read More
Given the head of a Linked List of size N, consisting of binary integers 0s and 1s, the task is to sort the given linked… Read More
Given an unsorted Singly Linked List consisting of N nodes that may contain duplicate elements, the task is to remove all but the last occurrence… Read More
Given a sorted doubly linked list of N nodes and an integer X, the task is to find the sum of three nodes in the… Read More