Textbook Notes (280,000)
CA (170,000)
UTSG (10,000)
ECE (80)
Chapter 19

# ECE244H1 Chapter Notes - Chapter 19: Binary Tree, Adjacency Matrix

Department
Electrical and Computer Engineering
Course Code
ECE244H1
Professor
Tarek Abdelrahman
Chapter
19

This preview shows half of the first page. to view the full 2 pages of the document.
ECE244 Graphics
What’s the difference between binary tree and graph?
- Binary tree has root and graphs don’t
- Binary tree has at most two children and root can be in cycle (n children)
- Graphs may have non-connected subtree and binary tree don’t
Graph Traversal Order:
- Visit children before siblings (depth first traversal)
- Visit siblings before children (breadth first traversal)
- Visit adjacent nodes with smaller weights before ones with larger weights (best first
traversal)
Depth First Traversal → visit children before siblings
Breadth First Traversal visit siblings before children
Which node should be the starting node?
- Usually the smallest node unless specify
What are “visit flaguse for in graphs?