Find Duplicate Subtrees | Leetcode 652 | Binary Trees

  Рет қаралды 5,787

Ayushi Sharma

Ayushi Sharma

Күн бұрын

Пікірлер: 17
@mdhaidarparwez968
@mdhaidarparwez968 Жыл бұрын
Time complexity of second approach is also o(n^2) but not o(n) because concatenation of string takes o(n) and in every recursion call string is concatenated
@vibhavsharma2724
@vibhavsharma2724 Жыл бұрын
Thanks for this best explanation . Your work is appreciable. Thanks 🙏🏻
@ombhandari6148
@ombhandari6148 Жыл бұрын
Can we use inorder or preorder traversal..?
@aditiraj9092
@aditiraj9092 3 ай бұрын
expected good explanation
@AyushiSharmaDSA
@AyushiSharmaDSA 3 ай бұрын
Sorry to disappoint you, will try harder next time :)
@forgedinstudies5853
@forgedinstudies5853 Жыл бұрын
Thanks! for sharing.
@piaknow3881
@piaknow3881 Жыл бұрын
Mam it would be helpful if these are kept in different playlists based on topic as well.
@Viralmems_xyz
@Viralmems_xyz Жыл бұрын
nice explanation
@codecreww
@codecreww Жыл бұрын
Thank you
@onesideoflife3724
@onesideoflife3724 Жыл бұрын
mam if we want found time complexity some given algorithms there is concept (TAKE LOG BOTH SIDES) this concept I want to learn which class I can find this concept in (school nd college time in mathematics) 🙏🙏🙏🙏
@mdhaidarparwez968
@mdhaidarparwez968 Жыл бұрын
Time complexity of second approach is also o(n^2) but not o(n)
@ashjournal
@ashjournal Жыл бұрын
👍👍👍
@BHASKARAGRAWAL-v5s
@BHASKARAGRAWAL-v5s Жыл бұрын
second approach is wrong as per the LeetCode constraints. value lies from -200 to +200, so return 0 in case of NULL does not make sense. and complexity is same as before. N*N. First one is good.
@JitendraKumar-ll4lz
@JitendraKumar-ll4lz Жыл бұрын
First one
@VineetKumar-pj1bk
@VineetKumar-pj1bk Жыл бұрын
yes i want O(N). Thanks❤
@mdhaidarparwez968
@mdhaidarparwez968 Жыл бұрын
Time complexity of second approach is also o(n^2) but not o(n)
@mdhaidarparwez968
@mdhaidarparwez968 Жыл бұрын
Time complexity of second approach is also o(n^2) but not o(n)
L14. Maximum Depth in Binary Tree | Height of Binary Tree | C++ | Java
8:05
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,6 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 586 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 102 М.
Unique Binary Search Trees II - Leetcode 95 - Python
12:51
NeetCodeIO
Рет қаралды 20 М.
7 Common Excel Mistakes You HAVE to Fix Today!
11:39
MyOnlineTrainingHub
Рет қаралды 21 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 740 М.
Binary Trees - Data Structures Explained
10:18
Aaron Jack
Рет қаралды 140 М.
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,6 МЛН