Tagged: data structure

Remove Duplicates from a Sorted Linked List 0

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

0

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

0

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

0

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

0

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

0

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

0

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

0

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