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?

Beginner
A Data structures B Decision stump C Distribution system D Data science
Show 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?

Beginner
A Data structures B Data Science C Decision stump D Distribution system
Show 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?

Beginner
A Array B Hash table C Linked list D Binary search tree
Show 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?

Beginner
A Queue B Graph C Stack D Hash map
Show 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?

Beginner
A Stack B Array C Queue D Tree
Show 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.

Beginner
A True B False
Show 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?

Intermediate
A Sorted array B Linked list C Hash table D Array
Show 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?

Intermediate
A It keeps a sorted array of all nodes at every level B It stores elements in contiguous memory for direct addressing C It hashes keys into buckets to avoid comparisons D The left < node < right invariant lets each step discard half the tree
Show 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?

Intermediate
A Using integer keys instead of string keys B Keeping the table sorted by key C Many collisions mapping different keys to the same bucket D Storing the table in contiguous memory
Show 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?

Intermediate
A Language, compiler, and runtime B Storage layout, invariants, and operations C Input, output, and error handling D Keys, values, and buckets
Show 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?

Intermediate
A The code has too many comments B The hardware lacks enough RAM C The programming language is too slow D The wrong data structure was chosen for the workload
Show 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?

Intermediate
A Tuning hyperparameters B Choosing a visualisation library C Cleaning data and framing the question D Writing the final report
Show 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?

Advanced
A Definitions are never useful in technical subjects B Data structures are not studied in computer science C The abbreviation `ds` always means Data Science instead D An abbreviation is a label whose meaning depends on context, so the definition is a guess
Show 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?

Advanced
A A stack with depth-first traversal only B A graph with shortest-path algorithms over a priority queue C A hash map keyed by city name D A sorted array of all road lengths
Show 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?

Advanced
A Both A and R are true, but R is not the correct explanation of A. B Both A and R are true, and R is the correct explanation of A. C A is false but R is true. D A is true but R is false.
Show 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?

Advanced
A I and II only B II and III only C I and III only D I, II, and III
Show 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?

Advanced
A Linked List B Sorted Array C Hash Table D Array
Show 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…

Make your own

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