Data Structures: Core Concepts: 17 MCQs with answers
All 17 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 6 questions
Q1. In most computer science curricula, what does `ds` stand for?
BeginnerShow answer & explanation
Data structures
`ds` is the near-universal abbreviation for **data structures** in computer science courses. The other readings belong to statistics, machine learning, and networking respectively.
Q2. A student reads a chapter titled 'Statistical Modelling and Inference' and sees `DS` throughout. What does it most likely mean here?
BeginnerShow answer & explanation
Data Science
The context signal — statistics and modelling — points to **Data Science**, not data structures. The abbreviation only means something inside its context.
Q3. Which data structure gives $O(1)$ access by index?
BeginnerShow answer & explanation
Array
An **array** stores elements contiguously, so the address of index $i$ is computed directly — $O(1)$ access. Linked lists and trees require traversal.
Q4. Which data structure powers the browser back button?
BeginnerShow answer & explanation
Stack
The back button needs **last in, first out** behaviour — that is a **stack**. A queue would give first in, first out, which is wrong for history.
Q5. Which data structure underlies a file-system directory hierarchy?
BeginnerShow answer & explanation
Tree
Directories nest inside directories, which is a hierarchical structure — a **tree**. Arrays, queues, and stacks are linear.
Q6. `ds` is an overloaded abbreviation: it most commonly means **data structures** in computer science and **Data Science** in statistics/analytics contexts.
BeginnerShow answer & explanation
True
`ds` is an overloaded abbreviation: it most commonly means **data structures** in computer science and **Data Science** in statistics/analytics contexts.
Building up · 6 questions
Q7. A developer needs fast insertion in the middle of a list and already holds a reference to the node. Which structure fits best?
IntermediateShow answer & explanation
Linked list
Holding the node, a **linked list** inserts in $O(1)$ by rewiring pointers. Arrays and sorted arrays need $O(n)$ shifting, and hash tables do not preserve order.
Q8. Why does a binary search tree achieve $O(\log n)$ search?
IntermediateShow answer & explanation
The left < node < right invariant lets each step discard half the tree
The **BST invariant** guarantees that at each comparison you can eliminate one entire subtree — halving the search space, which yields $O(\log n)$.
Q9. A hash table is described as giving $O(1)$ average lookup. What condition can degrade this?
IntermediateShow answer & explanation
Many collisions mapping different keys to the same bucket
Under heavy **collisions**, lookups fall back to scanning within buckets and the average $O(1)$ degrades. The other options are not causes of degradation.
Q10. Which three things together define every data structure?
IntermediateShow answer & explanation
Storage layout, invariants, and operations
Every data structure is defined by how it stores data (**layout**), what must always hold (**invariants**), and what it can do (**operations**).
Q11. A team's app freezes on large datasets. Profiling shows an $O(n^2)$ structure where an $O(n \log n)$ one would work. What is the most likely root cause?
IntermediateShow answer & explanation
The wrong data structure was chosen for the workload
Choosing the wrong structure is a common cause of slow software. The complexity class of the structure, not the language or hardware, is what turns milliseconds into seconds.
Q12. In the data science workflow, which stage typically consumes more time than modelling?
IntermediateShow answer & explanation
Cleaning data and framing the question
Cleaning and framing the question dominate the workflow. Deciding what to measure and whether the measurement is trustworthy is the hard part, not the modelling.
Topper level · 5 questions
Q13. A learner writes 'ds is the study of data structures' as a complete definition. Why is this flawed?
AdvancedShow answer & explanation
An abbreviation is a label whose meaning depends on context, so the definition is a guess
`ds` is overloaded — it also means Data Science, Decision Stump, Dataset, and distribution system. Treating the label as a definition skips the disambiguation step.
Q14. A maps app finds the shortest route between two cities. Which structure and algorithm family does this rely on?
AdvancedShow answer & explanation
A graph with shortest-path algorithms over a priority queue
Route finding models places as **graph** nodes and roads as edges, then runs shortest-path algorithms using a priority queue. A stack or hash map alone cannot express the road network.
Q15. Assertion (A): No single data structure is best for all operations. Reason (R): Each structure trades off search, insert, delete, and memory costs differently. Which judgement is correct?
AdvancedShow answer & explanation
Both A and R are true, and R is the correct explanation of A.
The trade-off in R is exactly why A holds: arrays win on access, linked lists on insertion, hash tables on average lookup — so the right choice depends on the workload.
Q16. Consider these statements about `ds`: I. In computer science it most commonly means data structures. II. In statistics it often means Data Science. III. It has exactly one correct meaning regardless of context. Which combination is correct?
AdvancedShow answer & explanation
I and II only
Statements I and II are both true readings of `ds`. Statement III is false — the abbreviation is overloaded, and its meaning depends on the field, course, and chapter.
Q17. Consider a scenario where a developer is tasked with implementing a data structure to efficiently handle a dynamic list of user inputs. The requirements specify that the application must support frequent insertions and deletions at arbitrary positions, while also needing to maintain the order of elements. Given these constraints, which data structure would be the most appropriate choice?
AdvancedShow answer & explanation
Linked List
The correct option is a Linked List because it allows for $O(1)$ insertions and deletions once you have a reference to the node, making it ideal for dynamic lists where elements are frequently added or removed. In contrast, an Array or Sorted Array would require $O(n)$ time for these operations, and a Hash Table does n…
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Exam prep
Get Veda free See what students get
Free to start · No ads · Works in 42 languages