FIND LARGEST VALUE IN EACH TREE ROW | LEETCODE # 515 | PYTHON BFS SOLUTION

  Рет қаралды 1,181

Cracking FAANG

Cracking FAANG

Күн бұрын

Пікірлер: 7
@rsKayiira
@rsKayiira 2 жыл бұрын
Great video one suggestion for the channel. You should do 3 or 2 separate playlists on prefix sum, sliding window and backtracking. Those 3 along with modified binary search are some of the hardest questions. The former two(prefix sum and sliding window have significant overlap) But for a lot of people this is what they're looking for. Thank you and looking forward to more videos.
@sarayarmohammadi3376
@sarayarmohammadi3376 Жыл бұрын
Thank you!
@YT.Nikolay
@YT.Nikolay 2 жыл бұрын
One day, I am gonna hit the like button first. Thank you! Despite the fact it's quite a simple problem, I understand you can't solve medium+ every time. I encourage you to continue, you're doing a huge impact!
@subee128
@subee128 Жыл бұрын
Thank you so much
@varunshrivastava2706
@varunshrivastava2706 2 жыл бұрын
Very nice and decent solution, Keep up the good work mate. I do have one questions in my solution instead of finding max_seen, I created an array level and stored every level in that array and then appended the max for every level to my answer. What should be the space complexity in such scenario?
@crackfaang
@crackfaang 2 жыл бұрын
You ideally don’t want to do that because it’s an extra pass through each levels values and you are creating an array that doesn’t need to be created. Your interviewer will 100% ask you to improve on this. I think the space complexity in that situation is still O(N) in the end but it’s not ideal to do that solution
@varunshrivastava2706
@varunshrivastava2706 2 жыл бұрын
@@crackfaang Can you tell me why would it remain the same O(N)?Will it also have any significant affect on the Time complexity as well? If let's suppose number of levels increases to 6 or 8.
EXPRESSION ADD OPERATORS | LEETCODE # 282 | PYTHON SOLUTION
24:05
Cracking FAANG
Рет қаралды 9 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Find Largest Value in Tree Row - Leetcode 515 - Python
8:06
NeetCodeIO
Рет қаралды 10 М.
DFS vs BFS, When to Use Which?
9:25
AlgoMonster
Рет қаралды 18 М.
Validate Binary Tree Nodes - Leetcode 1361 - Python
9:55
NeetCodeIO
Рет қаралды 11 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 233 М.
Kth Smallest Element in a BST - Leetcode 230 - Python
10:56
NeetCode
Рет қаралды 194 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН