Duplicate Subtrees | Binary Tree | GFG POTD | C++ | Java | Code Kar Lo

  Рет қаралды 752

CODE KAR LO

CODE KAR LO

Күн бұрын

Пікірлер: 12
@akhileshtiwari9218
@akhileshtiwari9218 3 ай бұрын
nice approach to tackle the problem of same preorder of different subtrees. Thanks for providing the solution!
@code_kar_lo
@code_kar_lo 3 ай бұрын
Thanks 🙏❤️
@amanrawat3194
@amanrawat3194 3 ай бұрын
sir your videos are amazing. Your teaching style is very good. Sir can you please launch a series on trees?
@code_kar_lo
@code_kar_lo 3 ай бұрын
Thanks a lot. Yes i will make a series in some days. Currently pattern series is going on you can watch that as well
@aizad786iqbal
@aizad786iqbal 3 ай бұрын
thanks... 1 - we can use set right instead of map? 2 - space kyun add kara.... bina space ke bhi toh same hi chalna chayie ? note --- one suggestion, please use colors, as sometimes it gets messy..
@code_kar_lo
@code_kar_lo 3 ай бұрын
Yes we can use set but i mostly prefer map 😅. Space i have added just to be in safer side i have said in the video as well that it can work without space as well Thanks for the suggestions
@aizad786iqbal
@aizad786iqbal 3 ай бұрын
@@code_kar_lo i tried HashSet, but facing issue in duplicates... i tried to check if answer is present already then don't add but since and stores node and thus address isn't same and contains logic not working on the ans , i use Java
@code_kar_lo
@code_kar_lo 3 ай бұрын
Yes if you are using set you the code will complex and you have to do multiple handilations
@kshitijkamble5816
@kshitijkamble5816 3 ай бұрын
bro there is similar q on leetcode try to solve then yo will know why space required
@KishanSingh-vc3re
@KishanSingh-vc3re 3 ай бұрын
you said its preordere, and then moved on to extreme left.
@code_kar_lo
@code_kar_lo 3 ай бұрын
Preorder means first you will add node then left then right and you can see while making the string first i am adding node data then going on left then right
@devlpr-nitish
@devlpr-nitish 3 ай бұрын
surkiya
Find Duplicate Subtrees | Leetcode 652 | Binary Trees
22:24
Ayushi Sharma
Рет қаралды 6 М.
Хасанның өзі эфирге шықты! “Қылмыстық топқа қатысым жоқ” дейді. Талғарда не болды? Халық сене ме?
09:25
Демократиялы Қазақстан / Демократический Казахстан
Рет қаралды 355 М.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 3 МЛН
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 61 МЛН
Lecture 67: Minimum Time to BURN the Entire Binary Tree || C++ Placement Series
28:28
L16. Diameter of Binary Tree | C++ | Java
13:47
take U forward
Рет қаралды 368 М.
FIND DUPLICATE SUBTREES | LEETCODE # 652 | PYTHON DFS SOLUTION
9:50
Cracking FAANG
Рет қаралды 4,8 М.
Rotate and Delete | Array | GFG POTD | C++ | Java | Code Kar Lo
17:32
Хасанның өзі эфирге шықты! “Қылмыстық топқа қатысым жоқ” дейді. Талғарда не болды? Халық сене ме?
09:25
Демократиялы Қазақстан / Демократический Казахстан
Рет қаралды 355 М.