Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. The order of… Read More

# Category Archives: Linked List

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

Partition a Linked List into 3 parts such that the maximum difference between their sizes is minimum

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 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

Given two unsorted Linked Lists, L1 of N nodes and L2 of M nodes, the task is to merge them to get a sorted singly… Read More

Given a doubly-linked list containing N nodes, where each node is at most K away from its target position in the list, the task is… Read More