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:
[ Ссылка ]
Algorithms repository:
[ Ссылка ]
Next video (rooting a tree):
[ Ссылка ]
Video slides:
[ Ссылка ]
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: [ Ссылка ]
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://i.ytimg.com/vi/0qgaIMqOEVs/maxresdefault.jpg)