Тёмный

Count Complete Tree Nodes (LeetCode 222) | Complete tree examples | Recursive & Iterative 

Nikhil Lohia
Подписаться 47 тыс.
Просмотров 2,7 тыс.
50% 1

Опубликовано:

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@vipulaggarwal8518
@vipulaggarwal8518 3 месяца назад
your voice is so pleasant to our ears and your way to explain the approach and code is absolutely fantastic. Thanks for the content you gave us !😊😇
@navyanavilu2639
@navyanavilu2639 2 месяца назад
Well explained. Thank you!
@sunilkumawat7959
@sunilkumawat7959 2 месяца назад
By looking at your code : T(n) = 2 T(n/2) + k, It gives nlog(n) time complexity. Please correct me if I am wrong
@jagicyooo2007
@jagicyooo2007 6 месяцев назад
so concise!
@user-um3vb7eu4k
@user-um3vb7eu4k 6 месяцев назад
Nice explanation sir ❤❤
@luminraja09
@luminraja09 3 месяца назад
So 1 is for the root node of the subTree / main tree ?
@udayrajvadeghar8555
@udayrajvadeghar8555 6 месяцев назад
Fire content :)
@jritzeku
@jritzeku 5 месяцев назад
Is there a way to add own test cases and see expected output on Leetcode? I feel like this would be helpful feature because the examples provided generally cover few edge cases only. I think I've seen some one create test case tree via comments and the run test for that. ex: check if following is valid BST, resulting in false /* 1 / \ 2 3 */
@nikoo28
@nikoo28 4 месяца назад
if you click the 'Console' window on leetcode, it allows you to pass custom test cases
@khushaldodeja8267
@khushaldodeja8267 5 месяцев назад
Is there anyone facing issue imagining how recursion works?
@khushaldodeja8267
@khushaldodeja8267 5 месяцев назад
could you dry run this question
@nikoo28
@nikoo28 5 месяцев назад
I will do a video on dry running a recursive problem.
@solzerid
@solzerid 4 месяца назад
This is one of the hurdles that make a huge difference in your ability to solve problems. Take some time to focus on recursion. Look at various simpler recursive problems until you can start to see patterns and visualize how it works. Once you can visualize recursion it will be a quantum leap forward in your programming skills. There are a lot of milestones like this, just try not to get discouraged and keep finding material on the subject until it clicks. You'll eventually have enough practice or find the perfect lesson for you that will make it 'click'.
@tanishkaagarwal6750
@tanishkaagarwal6750 6 месяцев назад
sir, please make a solution video on Next Permutation problem . Leetcode 31
@mhmd5ld81
@mhmd5ld81 6 месяцев назад
Tbh that question chases me in my dreams XD
@nikoo28
@nikoo28 6 месяцев назад
sure, I will add it to my pipeline of videos.
Далее
LeetCode was HARD until I Learned these 15 Patterns
13:00
Count Complete Tree Nodes | Leetcode #222
13:39
Просмотров 33 тыс.