Tagged: linked list

Implement Stack Using Linked List

“Implement Stack Using Linked List” is a popular programming problem asked in many technical and algorithmic interviews, based on both linked list and stack data structures. Here, we need to implement stack data structure using linked list data structure. We strictly recommend to read the following post before proceeding: Insert...

Merge Two Sorted Linked List

“Merge Two Sorted Linked List” is an intermediate problem exercise. Here, we are given two sorted linked list and our task is to merge these two sorted linked list into one sorted linked list. For example,  LIST1:            45 -> 78 -> 89 -> 93 -> 99 LIST2:           12 -> 22...

blank

Union and Intersection of two Linked Lists

“Union and Intersection of two Linked Lists” is one of the foremost problem asked in many technical and algorithmic interviews of product based companies. Here, we are given two linked list and our task is to write a program to find the union and intersection between given two linked list. ...

Remove Duplicates from a Sorted Linked List

Remove Duplicates from a Sorted Linked List

“Remove Duplicates from a Sorted Linked List” is one of the foremost problem of linked list data structure asked in many technical and algorithmic interviews of product-based company.  Here, we are given a sorted linked list and our task is to remove duplicates from a sorted linked list. For example,...

blank

Remove Duplicates from an Unsorted Linked List

“Remove Duplicates from an Unsorted Linked List” is one of the foremost problem asked in many technical and algorithmic interviews of product based companies. Here, we are given an unsorted linked list and our task is to remove all duplicate nodes from the given linked list. Here, we need to...

blank

Delete N Nodes After M Nodes of a Linked List

“Delete N Nodes After M Nodes of a Linked List” is one of the foremost  problem asked in many technical and algorithmic interviews of various product based companies.  Difficulty Level: Hard Here, we are given a linked list and our task is to delete N nodes after M nodes of a...

blank

Delete Alternate Nodes of a Linked List

“Delete Alternate Nodes of a Linked List” is a basic problem exercise for beginners based on linked list. Here, we are given a linked list and  our task is to delete every alternate node of a linked list. For example, we need to delete every alternate nodes of the following linked...