Skip to content

Category Archives: Linked List

Given a pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list… Read More
A simple solution is to traverse the linked list until you find the node you want to delete. But this solution requires a pointer to… Read More
Given a singly linked list and a key, count the number of occurrences of the given key in the linked list. For example, if the… Read More
Algorithm For C/C++: Iterate through the linked list and delete all the nodes one by one. The main point here is not to access the… Read More
Given a Linked List and a number N, write a function that returns the value at the Nth node from the end of the Linked… Read More
Given a singly linked list, find the middle of the linked list. For example, if the given linked list is 1->2->3->4->5 then the output should… Read More
Given a pointer to a node to be deleted, delete the node. Note that we don’t have a pointer to the head node. Recommended Practice… Read More
Write a GetNth() function that takes a linked list and an integer index and returns the data value stored in the node at that index… Read More
Write a function detectAndCountLoop() that checks whether a given Linked List contains loop and if loop is present then returns count of nodes in loop.… Read More

Start Your Coding Journey Now!