The height of a tree is:
Trees
Tree terminology and ADT, preorder/postorder traversals, binary trees and their properties, inorder traversal, expression trees, Euler tour, and linked and array representations.
How to read this page
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
All 25 slides
- 1 Presentation for use with the textbook Data Structures and Algorithms in Java, 6
- 2 What is a Tree
- 3 Tree Terminology
- 4 Tree ADT
- 5 Java Interface
- 6 as visitrootuss
- 7 axioms.in
- 8 A
- 9 Binary Trees
- 10 n 2 d
- 11 2x a t b
- 12 night
- 13 Decision Tree
- 14 Properties of Proper Binary Trees
- 15 BinaryTree ADT
- 16 L Root R
- 17 Print Arithmetic Expressions
- 18 Evaluate Arithmetic Expressions
- 19 Euler Tour Traversal
- 20 Linked Structure for Trees
- 21 A
- 22 Linked Structure for Binary Trees
- 23 Array-Based Representation of Binary Trees
- 24 Slide 24
- 25 Slide 25
Tree Terminology
Exam angle
Properties of Proper Binary Trees
Exam angle
A proper binary tree with 7 internal nodes has how many leaves?
- e = i + 1.
L Root R
Exam angle
Inorder traversal of a BST gives the keys:
Print Arithmetic Expressions
Notes
Print an arithmetic expression: inorder with parentheses. Evaluate it: postorder.
Array-Based Representation of Binary Trees
Exam angle
With the root at index 1, the children of node i are at: