Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed… Read More
Given a linked list, print reverse of it using a recursive function. For example, if the given linked list is 1->2->3->4, then output should be… 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
There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked… Read More
Given a sorted linked list and a value to insert, write a function to insert the value in a sorted way.Initial Linked List   Linked… Read More
Asked by Varun Bhatia. Question: Write a code for implementation of doubly linked list with use of single pointer in each node. Solution: This question… Read More
You are given a Double Link List with one pointer of each node pointing to the next node just like in a single link list.… Read More
Asked by Varun Bhatia. Question: Write a recursive function treeToList(Node root) that takes an ordered binary tree and rearranges the internal pointers to make a… Read More
Given a singly linked list of characters, write a function that returns true if the given list is a palindrome, else false. Recommended Practice… Read More
Given a linked list, check if the linked list has loop or not. Below diagram shows a linked list with a loop.     Recommended:… Read More