3 things I learn when I see this videos one is dsa concepts and other is consistency and commitment.
@inspiringzone122 жыл бұрын
Absolutely right
@khushisrivastava357 Жыл бұрын
Hey are u there? actually i am not able to find the codes on the github link after lec 65..i think they are missing
@RohitSharma-vq7ro Жыл бұрын
@@khushisrivastava357bro itna to khud try kar
@MSDHONI___ Жыл бұрын
consistency is important bro
@anuragpandey81652 жыл бұрын
30:15 You clearly have a strong understanding about where the students could get stuck. Much love
@govindsuryavanshi6653 Жыл бұрын
First I have completed all DSA series and now conclude this is Greatest ever DSA series to exist on youtube or paid courses. Your contribution will be remembered. You're God of DSA for us🙇♂ Thanks you.
@rishiagarwal81311 ай бұрын
bro 65th lecture ke bad GitHub par code links nhi hai ky ??
@aayushiagarwal8797 Жыл бұрын
Thank you sir :), for making tree simple and understandable . I would like to highlight one point : Mapping solution will give wrong answer in case of duplicated nodes..... in such case , we can optimize findpos() function by checking from inStart to inEND .. int findpos(int in[],int x,int n,int s,int e) { for(int i=s;i
@ritikrastogi6438 Жыл бұрын
Yes you're right
@simplesolutions26212 жыл бұрын
Best course! Best teacher! *Best time to learn!* 🔥
@sudhanshukumar3976 Жыл бұрын
mid course me kon coad dana band kar data hai ghanta best teacher
@yadvibhalla53922 жыл бұрын
Best course ever🔥 consistency++;
@haiderali08012 жыл бұрын
The best DSA course ✨❤️
@anmol3 Жыл бұрын
Question 1 Test case 54 fails after addition of new test case Solution: Can't use maps. Use findPosition function and pass inorderStart and inorderEnd as arguments and not n(size). This happens because elements might be repeated.
@yashbanka8877 Жыл бұрын
There is something wrong with this concept let me just clear it up . When you check for the location of the element in the inorder array you need not check it's location by traversing in the whole array instead , you need to check for the element in the required portion . In this case check for the element from in[inOrderStartIndex] to in[inOrderEndIndex] and you will just be fine
@shwetpatel2712 Жыл бұрын
Thanks Bro it works.
@PriyanshuSrivastava11fig Жыл бұрын
@@shwetpatel2712 please share the updated code. I'm not able to figure it out how to pass 54th test case using map
@shwetpatel2712 Жыл бұрын
@@PriyanshuSrivastava11fig sure here it is. class Solution{ public: int findposition(int element , int in[] , int start , int end) { for(int i = start ; i = n || inorder_start > inorder_end) { return NULL; } int element = pre[preorderindex]; Node* root = new Node(element); int position = findposition(element,in ,inorder_start , inorder_end); preorderindex++; root->left = solve(in,pre,n,preorderindex, inorder_start , position - 1); root-> right = solve(in , pre , n , preorderindex, position + 1 , inorder_end); return root; } Node* buildTree(int in[],int pre[], int n) { int preorderindex = 0; Node* temp = solve(in,pre,n, preorderindex, 0 , n-1); return temp; } };
@praveshishere6 ай бұрын
bro what would happend if elements are repeated in between inroderStart and inorderEnd
@top10shorts21 Жыл бұрын
The code mentioned in the video doesn't passes updated testcases --> So here is the updated code --> class Solution{ private: int Findposition(int in[] ,int inorderStart , int inorderEnd , int element ,int n){ for(int i = inorderStart ; i=n || inorderStart>inorderEnd){ return NULL ; } int element = pre[index++] ; // At every interation index is increasing Node* root = new Node(element); int position = Findposition(in , inorderStart , inorderEnd ,element, n); root->left = solve(in , pre , index , inorderStart , position-1 ,n); root->right = solve(in , pre , index , position+1 , inorderEnd ,n); return root ; } public: Node* buildTree(int in[],int pre[], int n) { // Code here int preorderindex = 0 ; //Pre order is NLR so First element is root . Node* ans = solve(in , pre , preorderindex , 0 , n-1 , n ); return ans ; }
@sourabhvishnoi9884 Жыл бұрын
Really helpful, thanks
@anmol3 Жыл бұрын
Thanks
@vimalrai2092 Жыл бұрын
it really helps, i was soo confused. thanks...
@AmitSharma-nv2oj Жыл бұрын
@@vimalrai2092 for which question
@khushdesai7600 Жыл бұрын
can u tell us what you have change in this code?? because i have see this couple of time but , i could not catch it??
@rampratapmishra59622 жыл бұрын
Wahh... Bhaiya mann gya aapko.. Kya consistency ha aapkee.. Ham ek video dekh nhi paarahe.. Aur aapke... New video... Aa rahe.. Ha bhaut saahi bhaiya.. Bass.. Aise hee consistentsy ham bhi continue kar paaye... Great bhaiya really great fan of you!!!!!! 🤗🤗
@vinayakgarg46282 жыл бұрын
Here we can also use unordered map (T.C - O(1)) as we don't need data to be sorted, so the overall t.c will be O(n)
@deepakpal2168 Жыл бұрын
Bro it will not work if we have dublicate values in array like (1 2 3 4 3)
@uditpanjiyar3203 Жыл бұрын
first question is explained very deeply but one more condition is also added on gfg that the values of root can be repeated thanks for the quality content
@ritesh_tiwari447 Жыл бұрын
for repeated nodes Just use map mpp and find element index by using {mpp[element].front()} then pop the queue
@prerakagarwal56232 жыл бұрын
You are doing literally a very good job. I got to understand many concepts easily after watching your videos. Trees are very well explained. Many Thanks.
@anuragmalviya23972 жыл бұрын
Bhaiya ki knowledge, video uploading me consistency, or way of explanation top notch hai!🔥🔥🔥
@VikrantK-c3j4 ай бұрын
Totally agreed
@kritarthtripathi97932 жыл бұрын
Best DSA course and consistency ++...Thank u so much for your effort❤
It is the best dsa course in the you tube bhaiya carry on we all are with you 🌹🌹
@iqfacts8647 Жыл бұрын
Best dsa course I have ever seen
@ritendrasinghbhadauriya57512 жыл бұрын
Sir apke efforts to wakai sir excellent and ek aur best cheez ki aap scratch se har cheez samjhate hai........and sir salute to your consistency........💯💯
@prabhatmishra67532 жыл бұрын
Great Efforts Sir....I think who wants to learn tree this is the platform
@scoc55vora15 Жыл бұрын
A Very WELL EXPLANATION wala Video and Insane amount of Effort of Love Bhaiya is clearly vivble and For that Again and Again Explanation Thank you bhaiya
@nishankdas1895 Жыл бұрын
Amazing observation bro on the inorder to postorder question. I have never thought it that way.
@aaravanand23253 ай бұрын
Sir ive been part of this course from the start And the amount of knowledge that i ve gained is just inexpressable When i saw that it was 7 am on morning and you were shooting i was forced to comment here Thankyou so much Whatever i am in DSA is due to you I owe you alot
@prashantbirajdar92712 жыл бұрын
wah bhaiyaa ..another an exciting session i understood every thing from this session thanks bhiyaa for providing free of cost DSA course...loves the most...content and your teaching technique is so optimistic...thanks again
@harpratapsinhnakoom35402 жыл бұрын
words are not enough to express our gratitude towards you.. Thank you bhaiya
@ayushjangid56492 жыл бұрын
One of the best teacher || mentor. Thank you so much bhaiya for this course literally the best course.
@pavanmutalikdesai66112 жыл бұрын
Best explanation!!! You make solutions look so simple.
@KPCoder2 жыл бұрын
Thanks you sir, excellent content, no one can explain like you from basic 🙏 god bless you
@shaleenspeaks0032 жыл бұрын
The best best best and best course ever
@niteshkoli0072 жыл бұрын
ab ye question mai kabhi bhi nhi bhulne wala😁
@curiosityOnItsPeak2 жыл бұрын
I used to get scared from some of questions including these But now .....Huhh! . All thanks to you bhaiya
@AyushKumar-yu5tj2 жыл бұрын
After this course Knowledge will be like knowledge= INT_MAX;
@rohanyadav2056 Жыл бұрын
Sir many many thanks to you You're an inspiration , I've referred this playlist to all my friends. Your dedication is next level sir
@Urahara252 жыл бұрын
One suggestion bhaiya... We don't wanna get demotivated...so contest ke bhi solutions practice krwaiyega please......And company specific category bhi ki like kis site se kaun si kaun si company specific pdhna h... Interviewbit ,gfg,...etc...Amazon, Microsoft,google nd aur bhi
@RahulKumar-wt9qc2 жыл бұрын
Shaandar video hai bhaiya 👍👍👍
@aashishrangdal96142 жыл бұрын
Deadline Seriously Le Rhe Ho Kya Bhaiyya😂 Consistant Level OP😁🥰
@someshsangwan37682 жыл бұрын
Op consistency bhaiya 👍🔥🔥🔥
@suvigyabasnotra73782 жыл бұрын
Can you give advice on what to do after seeing the solution of a problem you've never seen before and don't know how to code..?
@gauravverma46522 жыл бұрын
in first question u used map for optimisation which have complexity O(logn), shouldn't we use unordered_map for O(1) complexity ??
@Coder_DhruvArora2 жыл бұрын
Yes
@sahilchhabra23912 жыл бұрын
bhai dono me O(1) hogi na. Map ki key already pata h toh value toh yuhi nikal jaegi aur mp.find() use krne ki need nhi kyuki map toh bana hi saari entries se hai, key toh pakka hogi hi.
@Coder_DhruvArora2 жыл бұрын
@@sahilchhabra2391 I didn't got your point But even inserting into map also takes O(log n) So it definitely adds into time complexity
@sahilchhabra23912 жыл бұрын
@@Coder_DhruvArora oh I forgot about the insertion complexity for ordinary map 😅, ya ya u got that right
@tanishagarwal5992 Жыл бұрын
Basically if there are two equal elements in the inorder array , then it won't work and the testcases also are updated now, so the small change will be instead of looking in the entire inorder array, look in the part from instart to inend.
@rishiagarwal81311 ай бұрын
bro 65th lecture ke bad GitHub par code links nhi hai ky ??
@aishwaryaporwal23212 жыл бұрын
I just solving this question from ur DSA sheet n got this video notification ♥️♥️💯
@harshalpatil64825 ай бұрын
east or west babbar bhaiyya best
@shivkumar-og4ow2 жыл бұрын
thank you bhaiya .. you are doing regularly hardwork to complete this course .. bahut bahut dhanybad.. ❤💘💘💘💘
@rohitrohra7553 Жыл бұрын
u make everything simple
@simplesolutions26212 жыл бұрын
Love _Consistency_ Babbar!
@ziyadauti367610 ай бұрын
Best explanation compared to others...!
@ankitgaur74282 жыл бұрын
Bhai Lecture 66 onwards code ko github mai push kyo nhi kar rhe ho? Repo se code samajna easy rehta hai. during videos hum code samaj sakte and then after completion of video hum code repo se notedown kar sakte hai. so pls push code from lecture 66 onwards in github repo.
@fahadnazir8924 Жыл бұрын
is Source-code of lecture 66 onwards available anywhere ?
@shrajangupta8206 Жыл бұрын
did you got any sourse where codes are there this lecture onwards?
@bishalchatterjee7452 жыл бұрын
kabhi kabhi lagta hain humse to jyada app mehenat karte hain bhaiay...!!
@rishabhjain78382 жыл бұрын
Dedication 😱💯💯
@keshavgambhir98942 жыл бұрын
Present bhaiya Consistency op 🔥🔥🔥 Commenting for better reach
@prateeksharma36802 жыл бұрын
Attendance marked 👍👍👍 consistency 🔥🔥🔥
@Sam-rz5hw2 жыл бұрын
bhaiya aap best ho
@AahanRoy-l1i22 күн бұрын
bhaiya, we can also solve it using unordered map, which can reduce the TC to O(n).
@shobhit93169 ай бұрын
In these questions, maps is useful in cases that have no equal values of nodes. but if there are... then you've to go for the first approach whose TC is o(n^2). Correct me if I'm wrong If you're trying with maps and gfg is not accepting, do it by the 1st approach
@VivekSharma-lr7kx4 ай бұрын
use map of int ,queue insted
@rashmi_gaur2 жыл бұрын
Awesome Explanation!
@utkarshsingh14572 жыл бұрын
consistency op... Thanks for the beautiful content...Just enjoyed going through the lectures one by one... 😁
@deepak44222 Жыл бұрын
mehnat lag raha hai bhai tum enjoy kaise kar le rahe ho.🥺🥺🥺🥺
@ShailendraSingh-ob7rp2 жыл бұрын
Thank you bhaiya Maza aa gya questions solve krke ✌️✌️
@dewanshpatle90562 жыл бұрын
Best course ever consistency++;
@muhammadsuleman8936 Жыл бұрын
Lecture was amazing brother
@yourkp7 ай бұрын
Updated map solution for question - Construct Tree from Inorder & Preorder Intuition - Use Queue inside map to store the duplicates in the tree. class Solution{ public: void createMap(int in[], int n, map &nodeToIndex){ for (int i=0; i= n || inOrderStart > inOrderEnd){ return NULL; } //storing the node of preOrder (NLR) int element = pre[index++]; Node* root = new Node(element); //find the node in inorder (LNR) int position = nodeToIndex[element].front(); nodeToIndex[element].pop(); //recursive call for left and right root->left = solve(in, pre, n, index, inOrderStart, position-1, nodeToIndex); root->right = solve(in, pre, n, index, position+1, inOrderEnd, nodeToIndex); return root; } Node* buildTree(int in[],int pre[], int n) { int preOrderIndex = 0; map nodeToIndex; createMap(in, n, nodeToIndex); Node* ans = solve(in, pre, n, preOrderIndex, 0, n-1, nodeToIndex); return ans; } };
@siddharthyadav1885 Жыл бұрын
great work and effort
@aparnamanna13692 жыл бұрын
Bhaiya consistency
@yashgupta48662 жыл бұрын
Present bhaiya Consistency OP
@harshpandey4190 Жыл бұрын
Thankyou So much bhaiya going great
@RohitKumar-dy2gc Жыл бұрын
you made me feel the traversal of tree
@shashanksingh49682 жыл бұрын
consistency++. PBC on the go.
@arjunrai81262 жыл бұрын
Which company are you in, I mean how are u managing preparation and job?
@anandprateekbaranwal82752 жыл бұрын
Present bhaiya 🙋🏻♂️
@AA-wy9vw2 жыл бұрын
Loving the series!!
@SanjuJana-pj6pn Жыл бұрын
Thank you sir 😊
@shivanshsah7 ай бұрын
If you are reading this comment so I want to tell you that you have not provided the code in github from lecture 66
@abhayvarshney29934 ай бұрын
Any reason for that?😢
@ritikamehta97912 жыл бұрын
Great consistency sir💯💯. Thank youu vry much!!
@satwiksharma43592 жыл бұрын
Great series , very helpful .
@himanshukashyap88942 жыл бұрын
keep growing bhaiya. You do wonderful for us
@HarshJaiswal-v2f9 ай бұрын
code link from 66 lecture to end is not available sir , plzz upload the link the of code link. thank you from the bottom of my heart sir for making a beautiful series for us 😍😍
@vanshgawra2 жыл бұрын
I think if we use unordered map instead of map then our time complexity will be more better as it have T.C of O(1)
@roshangupta629 Жыл бұрын
NO bro, if we use map then if any number is repeating then we won't be able to make right tree.
@WizBoyYt Жыл бұрын
@@roshangupta629 but what will it effect? repeation se kya hoga usme ye set thodi h
@tarakmheta8856 Жыл бұрын
we can use mutlimap instead of map here@@roshangupta629
@Harry-ju9nv2 жыл бұрын
bhaiya bhut badia padate hoo aap
@daipayannit-s415 Жыл бұрын
Commenting for better reach !!
@ani682 жыл бұрын
Was waiting for this one......💯💯💯💯
@utkarshverma87732 жыл бұрын
ULTIMATE CONTENT
@ekanshsharma1309 Жыл бұрын
Simply Love You Bhaiya 💗💗
@adarshparitosh58702 жыл бұрын
Thank you so much bhaiya, before it I have been read 2,3 time but my concept was not clear but in first attempt I got 100℅ understanding of construct tree, ab mai DS se diprate ni ho rha😃ni to 4th sem me aa kar lgta tha khi CSE le kar galti to ni kr diye...
@mokshjain4985Ай бұрын
Great Work👋👋
@SanjeevChaube Жыл бұрын
bhaiya bhut axcha samjhate ho
@KACodes2 жыл бұрын
Ajeeee....mai Keya maza agaya
@faizanalam83602 жыл бұрын
Loved your efforts. Thank you bhaiya
@kunalbhika64247 ай бұрын
Great lecture as always😍
@VivekSharma-lr7kx4 ай бұрын
# for those who stuck in test case 53 # there are dublicate values use map below is full code:- ---------------------------------------------------------------------------------- class Solution{ public: int find(int in[],int n,int element){ for(int i=0;iend || ind >=n) return NULL; int element = pre[ind++]; Node* root=new Node(element); // int pos=find(in,n,element); int pos = mp[element].front(); mp[element].pop(); root->left=make(in,pre,n,ind,start,pos-1,mp); root->right = make(in,pre,n,ind,pos+1,end,mp); return root; } public: Node* buildTree(int in[],int pre[], int n) { map mp; for(int i=0;i
@abhishekkumar-mp6no2 жыл бұрын
bhaiya maja aa gaya
@7u5h422 жыл бұрын
🙌🙌 consistency OP
@parassetia49642 жыл бұрын
Lot of love to you bhaiya, hope you are well and fine. Just waiting for graphs and dp too😅
@laksheybanga81062 жыл бұрын
Mzaa aa rha h bhaiyaaa 💕❤️
@sukhjitsingh959 Жыл бұрын
keep coding and sharing errors as well as solutions to the error