nice approach to tackle the problem of same preorder of different subtrees. Thanks for providing the solution!
@code_kar_lo3 ай бұрын
Thanks 🙏❤️
@amanrawat31943 ай бұрын
sir your videos are amazing. Your teaching style is very good. Sir can you please launch a series on trees?
@code_kar_lo3 ай бұрын
Thanks a lot. Yes i will make a series in some days. Currently pattern series is going on you can watch that as well
@aizad786iqbal3 ай бұрын
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_lo3 ай бұрын
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
@aizad786iqbal3 ай бұрын
@@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_lo3 ай бұрын
Yes if you are using set you the code will complex and you have to do multiple handilations
@kshitijkamble58163 ай бұрын
bro there is similar q on leetcode try to solve then yo will know why space required
@KishanSingh-vc3re3 ай бұрын
you said its preordere, and then moved on to extreme left.
@code_kar_lo3 ай бұрын
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