Find Bottom Left Tree Value - LeetCode #513 - Python, JavaScript, Java, C++

preview_player
Показать описание
Let's solve Find Bottom Left Tree Value with Python, JavaScript, Java and C++ LeetCode #513! This is LeetCode daily coding challenge on February, 28th, 2024.

Welcome to our channel! In this video, we dive deep into the fascinating world of binary trees with the "Find Bottom Left Tree Value" problem.

Have you ever wondered how to find the leftmost value in the last row of a binary tree? Look no further! Our video explores this intriguing problem, providing insights, strategies, and solutions to help you master it.

Join us as we dissect the problem statement and walk through step-by-step solutions. Learn key techniques to navigate binary trees efficiently and uncover the hidden gem of the bottom-left tree value.

Whether you're a beginner exploring data structures or an experienced coder honing your skills, this video offers valuable insights into tackling the "Find Bottom Left Tree Value" problem.

Don't miss out on this opportunity to expand your knowledge and conquer binary tree challenges. Watch our video now and embark on a journey to discover the bottom-left tree value!

CodingNinja offers other videos on programming, algorithms, and data structures as well. Subscribe to the channel so you don't miss out on new content!

------------------------------------------------------------------------------------------------------
⭐️ Please subscribe to my channel from here.
------------------------------------------------------------------------------------------------------

■ Timeline
0:05 Explain DFS vs BFS for this question
1:23 Explain algorithm with BFS - Solution 1
6:30 Coding - Solution 1
8:19 Time Complexity and Space Complexity - Solution 1
8:38 Explain algorithm with BFS - Solution 2
11:15 Coding - Solution 2
12:16 Time Complexity and Space Complexity - Solution 2
12:30 Coding - Solution 3
14:39 Time Complexity and Space Complexity - Solution 3

■ Blind 75 LeetCode questions

■ Twitter

■ Instagram

■ Problem Link

■ Codes in the video
- Python

- JavaScript

- Java

- C++

■ Playlists

#pythonprogramming #leetcode #leetcode997 #algorithm #coding #programming #python #javascript #java #cplusplus
Рекомендации по теме
Комментарии
Автор

Let me add explanation to solution 2. The reason why the solution 2 works is that we append nodes from right to left in each level, that means the last node of each level should be the leftmost node. That's why the last updated value should be the leftmost value at the last level. Let me know if you have any questions about the video.

CodingNinjaExAmazon
Автор

The DFS faster in this case, than the BFS. I cant't understand, why...

antm
visit shbcf.ru