Linked List
43 problems to practice.
Reverse A Linkedlist
You have given a pointer to the head node of a linked list, the task is to reverse the linked list....
Middle Of A Linked List
given a singly linked list with head node head, return a middle node of linked list. if there is 2...
Palindrome Linkedlist
Given a singly linked list of Integers, determine it is a palindrome or not.
Fold Of Linkedlist
Given a singly linkedlist : l0 -> l1 -> l2 -> l3 -> l4 -> l5 -> l6 ..... -> ln-...
Unfold Of Linkedlist
Given a singly linkedlist : l0 -> ln -> l1 -> ln-1 -> l2 -> ln-2 -> l3 -> ln-3...
Merge Two Sorted Linkedlist
1. Merge two sorted linkedlists and return head of a sorted linkedlist. The list should be made by s...
Mergesort Linkedlist
Given the head of a linked list, return the list after sorting it in increasing order. Time Complex...
Segregate Even And Odd Nodes In A Linkedlist
Given a singly linklist, modify the list such that all the even numbers appear before all the odd nu...
Remove Nth Node From End Of Linkedlist
Given a singly linklist, remove the nth node from the end of the list and return its head.
Merge K Sorted Linkedlist
You are given an array of k linked-lists, each linked-list is sorted in increasing order. Merge all...
Reverse Node Of Linkedlist In K Group
1. Given a singly linklist, reverse the nodes of a linked list k at a time and return its modified l...
Reverse In Range
1. Given a singly linklist, Reverse a linkedlist from position starting position to end position. 2...
Copy Linkedlist With Random Pointers
1. Given a singly linklist with an additional random pointer which could point to any node in the li...
Is Cycle Present In Linkedlist
1. Given a singly linklist. determine if the linked list has a cycle in it. 2. There is a cycle in...
Add Two Linkedlist
1. You are give two single linkedlist of digits. 2. The most significant digit comes first and eac...
Subtract Two Linkedlist
1. You are give two single linkedlist of digits. 2. The most significant digit comes first and eac...
Multiply Two Linkedlist
1. You are given two single linkedlist of digits. 2. The most significant digit comes first and ea...
Cycle Node In Linkedlist
1. Given a linked list, return the node where the cycle begins. If there is no cycle, return null....
Intersection Node In Two Linkedlist Using Difference Method
1. Given the heads of two singly linked-lists headA and headB 2. Return the node at which the two l...
Remove Duplicate From Sorted Linkedlist
1. You are give a single sorted linkedlist of numbers. 2. remove all duplicate nodes such that dup...
Remove All Duplicates From Sorted Linkedlist
1. You are give a single sorted linkedlist of numbers. 2. remove all nodes that have duplicate num...
Segregate 01 Node Of Linkedlist Over Swapping Nodes
1. Given a singly linklist, Segregate 01 Node of LinkedList and return pivot node of linkedlist. 2....
Segregate 01 Node Of Linkedlist By Swapping Data
1. Given a singly linklist, Segregate 01 Node of LinkedList and return pivot node of linkedlist. 2....
Segregate 012 Node Of Linkedlist Over Swapping Nodes
1. Given a singly linklist, Segregate 012 Node of LinkedList and return pivot node of linkedlist. 2...
Segregate 012 Node Of Linkedlist By Swapping Data
1. Given a singly linklist, Segregate 012 Node of LinkedList and return pivot node of linkedlist. 2...
Quicksort In Linkedlist
1. Given the head of a linked list, return the list after sorting it in increasing order. 2. You mu...
Segregate Node Of Linkedlist Over Last Index.
1. Given a singly linklist, Segregate Node of LinkedList over lastindex and return pivot node of lin...
Segregate Node Of Linkedlist Over Pivot Index
1. Given a singly linklist, Segregate Node of LinkedList over pivot index and return starting node o...
Add First In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Add Last In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove First In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove Last In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Get First And Get Last In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Get At In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Add At In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove At In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Add Before In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Add After In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove After In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove Before In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Display Forward And Backward In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Remove Node In Doubly Linkedlist
1. You are given a partially written DoublyLinkedList class. 2. You are required to complete the bo...
Design Lru Chache
1. Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. 2....