WBJECA 2025 — Computer PYQ
WBJECA | Computer | 2025Which of the following can be done with Linked List?
Choose the correct answer:
- A.
Implementation of Stacks and Queues
- B.
Implementation of Binary Trees
- C.
Implementation of Data Structures that can simulate Dynamic Arrays
- D.
All of the above
(Correct Answer)
All of the above
Explanation
Correct Option: (D) All of the above
Explanation
A Linked List is a fundamental linear data structure consisting of nodes, where each node points to the next, allowing for efficient insertions and deletions. It is highly versatile:
Implementation of Stacks and Queues (A): Linked lists are frequently used to implement Stacks (LIFO) and Queues (FIFO) because they allow O(1) time complexity for insertions and deletions at the ends of the structure.
Implementation of Binary Trees (B): In many tree implementations, nodes are linked together using pointers similar to a linked list structure to maintain the hierarchy:
Tree_Node={data,pointer to left child,pointer to right child}
Simulating Dynamic Arrays (C): While arrays provide O(1) access, linked lists can be used to manage collections of data that grow dynamically, overcoming the fixed-size limitation of traditional arrays.
