



































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




































































Source: Based on foundational data structures curricula covering linked list theory, node structures, insertion and deletion algorithms, traversal techniques, memory allocation, pointer manipulation, and performance analysis. References draw from established computer science course materials and exam preparation resources.
B) A linear data structure consisting of a sequence of connected nodes, where each node stores data and a reference to the next node C) A tree structure with parent-child relationships D) A hash table with key-value pairs Answer: B Explanation: A linked list is a linear data structure comprising a set of connected nodes. Each node stores data and also the address (link/pointer) to the next node in the sequence. This is fundamentally different from arrays, which require contiguous memory allocation.
C) NULL (or None in Python) D) The tail node Answer: C Explanation: The last node in a standard singly linked list points to NULL (or null/None) to signify the end of the list. This is the termination condition used during traversal.
Answer: C Explanation: A linked list requires O(n) space to store n elements. However, unlike arrays, each node carries additional overhead for pointers. The asymptotic space requirement is O(n).
B) O(log n) C) O(n) D) O(n²) Answer: C Explanation: Searching for an element in a linked list typically requires O(n) time in the worst case because you must traverse from the head until the element is found (or you reach the end). This is a key difference from arrays or balanced trees which offer faster search.
memory (using delete in C++ or relying on garbage collection in languages like Java). Failure to deallocate results in a memory leak.
Answer: B Explanation: A doubly linked list node contains a data part and two addresses: a pointer to the previous node and a pointer to the next node.
Explanation: Without a backward link, you cannot find the predecessor of the target node. You must scan from the head until you locate the node whose next points to the target, resulting in O(n) time.