36 Problems

LinkedList

Master linkedlist problems with detailed brute force and optimal solutions.

01
Write a Program to reverse the Linked List (Both Iterative and recursive)
Click to view brute force and optimal solutions
02
Reverse a Linked List in group of Given Size [Very Imp]
Click to view brute force and optimal solutions
03
Write a program to Detect loop in a linked list
Click to view brute force and optimal solutions
04
Write a program to Delete loop in a linked list
Click to view brute force and optimal solutions
05
Find the starting point of the loop
Click to view brute force and optimal solutions
06
Remove Duplicates in a sorted Linked List
Click to view brute force and optimal solutions
07
Remove Duplicates in a Un-sorted Linked List
Click to view brute force and optimal solutions
08
Write a Program to Move the last element to Front in a Linked List
Click to view brute force and optimal solutions
09
Add 1 to a number represented as a Linked List
Click to view brute force and optimal solutions
10
Add two numbers represented by linked lists
Click to view brute force and optimal solutions
11
Intersection of two Sorted Linked List
Click to view brute force and optimal solutions
12
Intersection Point of two Linked Lists
Click to view brute force and optimal solutions
13
Merge Sort For Linked lists [Very Important]
Click to view brute force and optimal solutions
14
Quicksort for Linked Lists [Very Important]
Click to view brute force and optimal solutions
15
Find the middle Element of a linked list
Click to view brute force and optimal solutions
16
Check if a linked list is a circular linked list
Click to view brute force and optimal solutions
17
Split a Circular linked list into two halves
Click to view brute force and optimal solutions
18
Write a Program to check whether the Singly Linked list is a palindrome or not
Click to view brute force and optimal solutions
19
Deletion from a Circular Linked List
Click to view brute force and optimal solutions
20
Reverse a Doubly Linked list
Click to view brute force and optimal solutions
21
Find pairs with a given sum in a DLL
Click to view brute force and optimal solutions
22
Count triplets in a sorted DLL whose sum is equal to given value X
Click to view brute force and optimal solutions
23
Sort a k sorted Doubly Linked list [Very IMP]
Click to view brute force and optimal solutions
IMP
24
Rotate Doubly Linked list by N nodes
Click to view brute force and optimal solutions
25
Rotate a Doubly Linked list in group of Given Size [Very IMP]
Click to view brute force and optimal solutions
IMP
26
Can we reverse a linked list in less than O(n)
Click to view brute force and optimal solutions
27
Why Quicksort is preferred for Arrays and Merge Sort for LinkedLists
Click to view brute force and optimal solutions
28
Flatten a Linked List
Click to view brute force and optimal solutions
29
Sort a LL of 0s, 1s and 2s
Click to view brute force and optimal solutions
30
Clone a linked list with next and random pointer
Click to view brute force and optimal solutions
31
Merge K sorted Linked list
Click to view brute force and optimal solutions
32
Multiply 2 no. represented by LL
Click to view brute force and optimal solutions
33
Delete nodes which have a greater value on right side
Click to view brute force and optimal solutions
34
Segregate even and odd nodes in a Linked List
Click to view brute force and optimal solutions
35
Program for nth node from the end of a Linked List
Click to view brute force and optimal solutions
36
Find the first non-repeating character from a stream of characters
Click to view brute force and optimal solutions