16 flashcards · Shared on 19 August 2026 by AtomAI Library
Flip each card to check yourself.
What is the typical time complexity of accessing an array element by index?
O(1)
What is the typical time complexity of accessing an array element by index?
O(1)
How does a doubly linked list differ from a singly linked list?
Each node normally has references to both the next and previous nodes
Which ordering rule is used by a standard queue?
First in, first out
What is the main purpose of implementing an array-based queue as a circular queue?
To reuse array positions freed by earlier dequeues
Which description best defines an array?
A collection of elements stored in indexed positions, typically in contiguous memory
Which pair of operations adds and removes elements from a stack?
Push and pop
Where are elements normally added and removed in a queue?
Added at the rear and removed from the front
What does underflow mean for a stack or queue?
An attempt is made to remove an element when the structure is empty
What is the typical time complexity of finding the element at position n in a singly linked list?
O(n)
If the relevant node is already known, what is a key advantage of a linked list over an array?
Insertion or deletion can be performed without shifting later elements
What does a stack's peek operation normally do?
Returns the top element without removing it
Which task is commonly supported by a stack?
Managing function calls and return addresses
Why is inserting an element near the beginning of an array usually an O(n) operation?
Existing elements may need to be shifted to new positions
What distinguishes a dynamic array from a conventional fixed-size array?
It can grow by allocating a larger block and copying elements when necessary
Which description best defines a singly linked list?
Each node contains data and a reference to the next node
Which ordering rule is used by a stack?
Last in, first out