Recall & Review
beginner
What is a key feature of a tree data structure?
A tree organizes data in a hierarchy with a root node and child nodes, showing parent-child relationships clearly.
Click to reveal answer
beginner
How does an array store data compared to a tree?
An array stores data in a flat, linear order without hierarchy, using indexes to access elements directly.
Click to reveal answer
beginner
What is the main difference between a linked list and an array?
A linked list stores elements in nodes connected by pointers, allowing dynamic size and easy insertion/removal, unlike fixed-size arrays.
Click to reveal answer
intermediate
Why is a tree preferred when hierarchy matters?
Because trees represent parent-child relationships naturally, making it easy to model structures like file systems or organization charts.
Click to reveal answer
intermediate
Can an array represent hierarchical data effectively? Why or why not?
Arrays can store hierarchical data but do not show relationships clearly; extra logic is needed to interpret hierarchy, unlike trees.
Click to reveal answer
Which data structure naturally shows parent-child relationships?
✗ Incorrect
Trees organize data in a hierarchy with clear parent-child links.
Which data structure allows dynamic size and easy insertion/removal?
✗ Incorrect
Linked lists use pointers to connect nodes, allowing flexible size and easy changes.
What is a limitation of using arrays for hierarchical data?
✗ Incorrect
Arrays store data linearly and do not show hierarchy without extra logic.
Which data structure is best for representing a file system hierarchy?
✗ Incorrect
Trees naturally model hierarchical structures like file systems.
In a linked list, how are elements connected?
✗ Incorrect
Linked list nodes hold pointers to the next node, linking elements dynamically.
Explain when and why you would choose a tree over an array or linked list for storing data.
Think about how data is connected and what structure shows relationships clearly.
You got /4 concepts.
Describe the main differences between arrays, linked lists, and trees in terms of structure and use cases.
Consider how data is stored and accessed in each structure.
You got /4 concepts.