Загрузка страницы

AMAZON - BINARY TREE PATHS (LeetCode)

This is one of Amazon's most commonly asked interview questions according to LeetCode (2019)! Binary Tree Paths coding solution. If you give me 5 minutes you'll thank me if this appears during your Amazon interview! Coding Interviews Binary Tree Paths (LeetCode) question and explanation.

SOCIAL
----------------------------------------------------------------------------------------------------------------
Support me on Patreon: https://www.patreon.com/KevinNaughtonJr Follow me on Twitter: https://twitter.com/KevinNaughtonJr
Follow me on Instagram: https://instagram.com/kevinnaughtonjr/
Follow me on GitHub: https://github.com/kdn251

DISCORD CHANNEL
----------------------------------------------------------------------------------------------------------------
To join the Discord channel use the following link and join the "Member" tier: https://www.patreon.com/KevinNaughtonJr In this Discord channel, you will be able to...
1. Ask me questions directly (as well as other members)
2. Ask about and discuss previous interview experiences
3. Find mock interview partners
4. Share helpful videos for interview preparation, and more!

This question is commonly asked by the following companies: Amazon

Link to problem: https://leetcode.com/problems/binary-tree-paths/

Intuition behind solution: Iterate through the tree using a dfs. At each recursive call add the current node's value to your string "path" and either...
1. Add the current path to the list of paths (base case)
2. Continue traversing the current node's left child and right child adding an arrow if they exist.

MUSIC
----------------------------------------------------------------------------------------------------------------
Mii Rose (IG @ heckohvro) by
MAJORA✰
https://soundcloud.com/uwumajora/mii-rose

#coding #leetcode #softwareengineer

Видео AMAZON - BINARY TREE PATHS (LeetCode) канала Kevin Naughton Jr.
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
16 сентября 2019 г. 4:00:10
00:07:53
Яндекс.Метрика