Beginner tree algorithms | Graph Theory

Опубликовано: 24 Март 2026
на канале: WilliamFiset
46,602
1.1k

Beginner tree algorithms: tree height and leaf sum

Support me by purchasing the full graph theory course on Udemy which includes additional problems, exercises and quizzes not available on YouTube:
https://www.udemy.com/course/graph-th...

Algorithms repository:
https://github.com/williamfiset/algor...

Next video (rooting a tree):
   • Rooting a tree | Graph Theory  

Video slides:
https://github.com/williamfiset/Algor...

0:00 Intro
0:40 Problem 1: Leaf node sum
2:19 Problem 1: Pseudocode
3:32 Problem 2: Tree height
6:50 Problem 2: Pseudocode
8:25 Problem 2: Tree height simplification

===================================

Practicing for interviews? I have used, and recommend `Cracking the Coding Interview` which got me a job at Google. Link on Amazon: https://amzn.to/3cvMof5

A lot of the content on this channel is inspired by the book `Competitive Programming` by Steven Halim which I frequently use as a resource and reference. Link on Amazon: https://amzn.to/3wC2nix