Advertisements
Advertisements
Question
What is the importance of the reference part in a Linked List?
Solution
The reference stores a link or reference to the next node in the linked list. This makes it easier to navigate or search the linked list.
APPEARS IN
RELATED QUESTIONS
Answer the following question on the diagram of a Binary Tree given below:
State the degree of the nodes C and G. Also, state the level of these nodes when the root is at level 0.
Answer the following question on the diagram of a Binary Tree given below:
Write the pre-order and post-order traversal of the above tree structure.
Answer the following questions from the diagram of a Binary Tree given below:
- Write the pre-order traversal of the above tree structure.
- Name the parent of the nodes D and B.
- State the level of nodes E anf F when the root is at level 0.
Answer the following questions based on the diagram of a Binary Tree given below:
- Name the external nodes of the tree.
- State the degree of node M and node L.
- Write the post-order traversal of the above tree structure.
A linked list is formed from the objects of the class Node. The class structure of the Node is given below:
class Node
{
int n;
Node link;
}
Write an Algorithm OR a Method to search for a number from an existing linked list. The method declaration is as follows:
void FindNode( Node str, int b)
Answer the following questions from the diagram of a Binary Tree given below:
- Name the root of the left sub tree and its siblings.
- State the size and depth of the right sub tree.
- Write the in-order traversal of the above tree structure.