
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is time complexity of inserting a node at the head of a Singly Linked List?
Correct Answer: A) O(1)
Step-by-step Solution: Inserting at the head requires modifying the new node's next pointer and redirecting head. No traversal is needed. Time = O(1).
What is a disadvantage of Singly Linked Lists compared to Arrays?
Correct Answer: A) Random access is not allowed
Step-by-step Solution: To access the i-th node, you must traverse from the head sequentially. Arrays allow O(1) index-based access.
Linked lists are dynamic structures. They do not need contiguous blocks of memory.