Skip to content

Category Archives: Linked List

Given a linked list and an integer M, the task is to append the last M nodes of the linked list to the front.Examples:   Input:… Read More
Given a binary tree, the task is to convert it into a sorted linked list.Examples:   Input: 1 / \ 2 3 Output: 1 2 3… Read More
Given a singly linked list and an integer K, the task is to reverse every K nodes of the given linked list. Examples:  Input: 1… Read More
Given a singly linked list where each node represents a character including special characters, the task is to remove all the occurrences of special characters… Read More
Given the pointers to the head nodes of two linked lists. The task is to compare the numbers represented by the linked lists. The numbers… Read More
Prerequisite: Linked List, Circular Linked List A header node is a special node that is found at the beginning of the list. A list that… Read More
Given a doubly-linked list and an integer N, the task is to rotate the linked list clockwise by N nodes.Examples:   Input: N = 2   Output:  … Read More
A Generalized Linked List L, is defined as a finite sequence of n>=0 elements, l1, l2, l3, l4, …, ln, such that li are either… Read More
Given a singly linked list and the task is to convert it into an array.Examples:   Input: List = 1 -> 2 -> 3 -> 4… Read More
Given a singly linked list and an integer K, the task is to rotate the linked list clockwise to the right by K places.Examples:   Input:… Read More
Given a linked list which represents an integer number where each node is a digit of the represented integer. The task is to add a… Read More
There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked to… Read More
Given a linked list, the task is to reverse the contiguous even elements and print the updated linked list.  Input: 1 -> 2 -> 3… Read More
Given an array arr[] of integers and a pointer to a random node of a circular sorted linked list (initially empty), the task is to… Read More
Given K sorted doubly linked list. The task is to merge all sorted doubly linked list in single sorted doubly linked list means final list… Read More

Start Your Coding Journey Now!