Skip to content

Category Archives: Linked List

Given a linked list of integers and a number K, find the maximum product of a sublist of length K in a linked list. Examples:… Read More
Given a binary linked list that consists of the 1s and 0s nodes, the task is to find the number of zero-filled subarrays in the… Read More
Given two linked lists head1 and head2, the task is to find occurrences of head2 in head1. Examples: Input: Head1 = 1->2->3->2->4->5->2->4, Head2 = 2->4Output:… Read More
Given a Linked List, the task is to sort this Linked List in ascending order. Examples: Input: 10->30->20->5Output: 5->10->20->30 Input: 20->4->3Output: 3->4->20 Approach: We can… Read More
Given a singly Linked list, find all palindromic subarrays of length greater than two. Examples: Input: Linked List =  1 -> 2 -> 3 ->… Read More
Given a linked list and the task is to find the mode of the linked list. Note: Mode is the value that appears most frequently… Read More
Given a head of a singly linked list and a target value. The task is to find whether there exist any two nodes in the… Read More
Given a linked list of even length, where each element is an integer, the task is to reverse the list by performing the following steps… Read More
What is a Cache locality? Cache locality refers to the property of computer programs where they tend to access a small, specific set of data… Read More
Given a singly linked list List containing N nodes representing a number, the task is to check whether the given linked list is an Armstrong… Read More
Given a linked list of integers and a number K, find the maximum sum of a subarray of length K.  Examples: Input: List = 1… Read More
Given the head of a linked list, the task is to replace all the values of the nodes with the nearest prime number. If more… Read More
A linked list is a linear data structure used for storing a sequence of elements, where each element is stored in a node that contains… Read More
Given a linked list of characters and a string S. Return all the anagrams of the string present in the given linked list. In case… Read More
A circular doubly linked list is defined as a circular linked list in which each node has two links connecting it to the previous node… Read More