Trees and Hierarchical Concepts Flashcards

1
Q

What’s the difference between Linked and Arrayed Tree Implementation

A
  • Linked Implementation: Uses object instances that refer to each other, like nodes referring to other nodes.
  • Arrayed Implementation: Stores the data items of the tree nodes in a single array.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the key components of a Tree Object?

A
  • Initialization: Can be initialized as empty or with a root, left subtree, and right subtree.
  • State Querying: Can report if it’s empty and provide the data item in its root node.
  • Subtree Access: Can provide references to its left and right subtrees.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly