There is a linked list. The last node could point back to any node in the list (including the head). Find the node in the list to which the last node points. Or in other words at which node does the circular linked list start.
You are given two singly linked lists, such that they start from two different nodes (head) and then, a few nodes down the list, they meet at a common node and then share all the nodes henceforth until the tail. The task is to find the first common node.
You are given a circular single linked list of sufficiently many number of
nodes(in the millions). You need to delete a node say P and you are
given a pointer to P in the circular single list.
Suggest the most efficient methodology of deleting the node P from the
circular single linked list without rounding about the circular single
linked list.
Imagine you have an unbalanced binary search tree. Now make a linked list of all the nodes at every depth(level) of the tree. Assume every node along with a left and a right pointer also has a next pointer. To make the linked list inside the binary tree for every level, the next pointer of the first node at every depth should point to the next node at the same depth in the tree and so on for the other nodes. What is the complexity of your algorithm. Improve the efficiency.Code the algorithm and then thoroughly test it?