Tagged: data structure

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,...

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...

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...

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...

Delete all Occurrence of the key from the given linked list

“Delete all Occurrence of the key from the given linked list” is again one of the important problem asked in many technical interview based on linked list. Here, we are given a linked list and our task is to delete all occurrences of a given key ‘x’ from a linked...

Delete Node without head pointer of the Linked List

“Delete Node without head pointer of the Linked List” is a tricky problem based on linked list data structure asked in many technical interview. Here, We are given a node address of a node to be deleted from the linked list and Our task is to delete that node. The head...

Delete Nth Node of the Linked List

“Delete Nth Node of the Linked List” is a basic problem exercise for beginners based on linked list. Here, we are given a linked list and our task to delete nth position node. To do so, we need to traverse the linked list to the node just before the nth...

Delete Complete Linked List

“Delete Complete Linked List” is one of the basic problem exercise for beginners. Here, we are given a linked list and our task is to delete complete linked list or simply, delete all the nodes of the linked list. To do so, we will traverse the complete linked list and...

Segregate Even and Odd Nodes in a Linked List

“Segregate Even and Odd Nodes in a Linked List” is one of the favourite technical interview problem based on linked list asked in many technical interviews of product based companies.  Here, we are given a linked list and our task is to segregate even and odd nodes in a linked...

Detect and Remove Loop in the Linked List

“Detect and Remove Loop in the Linked List” is one of the most asked problem asked in technical and algorithmic interview. This problem is an extension of problem “Detect Loop in the Linked List”. In this problem, we need to first detect whether there exists a loop in the linked...