In the basic/top-level classification of data structures, data structures are…
2019
In the basic/top-level classification of data structures, data structures are generally of how many main types?
Answer: B. 2 — Concept: A top-level classification splits a collection once, using a single criterion. The number of main types is simply the number of groups that first…
- A.
1
- B.
2
- C.
3
- D.
4
- E.
5
Attempted by 2007 students.
Show answer & explanation
Correct answer: B
Concept: A top-level classification splits a collection once, using a single criterion. The number of main types is simply the number of groups that first split produces. Any further criterion applied inside one of those groups creates sub-types, never new main types.
Application: The first split asks one yes/no question about each data structure: is it an atomic data item that cannot be broken down into smaller data items, or is it derived by combining such atomic items? That question has exactly two answers:
Primitive (atomic): integer, float, character, boolean.
Non-primitive (derived / composite): array, linked list, stack, queue, tree, graph.
So the first split produces exactly 2 main types.
Cross-check: Many courses state the split directly as linear vs. non-linear instead:
Linear: array, linked list, stack, queue.
Non-linear: tree, graph.
That is again a single split into 2 groups. Where a course keeps both namings, linear vs. non-linear is a further division of the non-primitive group -- one level below the first split -- so it still adds no extra main types. Under either convention the count of main types stays 2, so the answer is 2.
Why the other counts do not hold:
1: leaves the collection undivided; a single group is not a division into types at all.
3: counts one label from the first split alongside both labels of the split one level below it, mixing two levels into a single list.
4: counts both labels of the first split alongside both labels of the split one level below, as if all four sat at the same level.
5: counts those four labels plus a further one from a deeper split; no standard convention places five groups at the top level.
Explore the full course: Bihar Stet Paper Ii Computer Science