Linked List Practice Problems in C/C++
The following is the list of C/C++ programs based on the level of difficulty:
Easy
- Insertion in Linked List
- Deletion in Linked List
- Write a Function to Get N th Node in a Linked List
- Given a Linked List Which is Sorted, How will you Insert in the Sorted Way
- Given Only a Pointer/Reference to a Node to be Deleted in a Singly Linked List, how do you Delete it?
- Find the Middle of a Given Linked List
- Program for Nth Node From the End of a Linked List
- Write a Function to Delete a Linked List
- Reverse a Linked List
- Detect Loop or Cycle in a Linked List
Medium
- Function to Check if a Singly Linked List is Palindrome
- Write a Function to Get the Intersection Point of Two Linked Lists
- Remove Duplicates from an Unsorted Linked List
- Intersection of Two Sorted Linked Lists
- Merge Two Sorted Linked Lists
- Reverse a Linked List in Groups of Given Size
- Reverse Alternate K Nodes in a Singly Linked List
- Delete Nodes Which Have a Greater Value on Right Side
- Segregate Even and Odd Nodes in a Linked List
- Detect and Remove Loop in a Linked List
Hard
- Clone a Linked List with Next and Random Pointer
- Quicksort on Singly Linked List
- Merge Sort for Linked Lists
- The Great Tree-list Recursion Problem.
- Sorted Linked List to Balanced BST
- In-place Conversion of Sorted DLL to Balanced BST
- LRU Cache Implementation
- Flattening a Linked List
- Add Two Numbers Represented by Linked Lists | Set 2
- Flatten a Multilevel Linked List
Linked List C/C++ Programs
The Linked Lists are linear data structures where the data is not stored at contiguous memory locations so we can only access the elements of the linked list in a sequential manner. Linked Lists are used to overcome the shortcoming of arrays in operations such as deletion, insertion, etc.
In this article, we will discuss some of the common practice problems on linked lists in C/C++.
Prerequisite: Linked List Data Structure