Skip to content

Tag Archives: Linked Lists

Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has… Read More
Which of the following points is/are true about Linked List data structure when it is compared with array (A) Arrays have better cache locality that… Read More
What does the following function do for a given Linked List with first node as head? void fun1(struct node* head) { if(head == NULL) return;… 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 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 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 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
Given a linked list, check if the linked list has a loop or not. The below diagram shows a linked list with a loop.  Linked… 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 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!