Рет қаралды 8,502
There can be so many paths in a binary tree. This video tells you how to smartly navigate the binary tree using a level order traversal technique so that you can easily determine if there is a path that has a particular sum.
Actual problem on LeetCode: leetcode.com/problems/path-sum/
Chapters:
00:00 - Intro
01:01 - Problem Statement and Description
02:42 - Finding all the possible paths (Brute Force)
04:44 - Using level order traversal smartly
09:44 - Dry-run of Code
13:54 - Final Thoughts
📚 Links to topics I talk about in the video:
Level Order Traversal: • Level order traversal ...
Recursion Algorithmic Paradigm: • Recursion paradigms wi...
Tree Data Structure: • Understanding Tree Dat...
Playlist on Trees: • Trees
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: github.com/nikoo28/java-solut...
Test-cases on Github: github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: amzn.to/36pU0JO
Favorite book to understand algorithms: amzn.to/39w3YLS
Favorite book for data structures: amzn.to/3oAVBTk
Get started for interview preparation: amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: amzn.to/3pAqh8O
Microphone: amzn.to/2MCX7qU
Recording Camera: amzn.to/3alg9Ky
Tablet to sketch and draw: amzn.to/3pM6Bi4
Surface Pen: amzn.to/3pv6tTs
Laptop to edit videos: amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: studyalgorithms.com/feed/
Join fan mail: eepurl.com/g9Dadv
#leetcode #programming #interview