Although I was in Vietnam, I do not know much about English, but you preach is easy to understand . Easier to understand than the Vietnamese . Fantastic !! Thank you very much.
@mycodeschool10 жыл бұрын
Dũng Nguyễn Hoàng Anh Love to Vietnam :)
@ntlzz939 жыл бұрын
Dũng Nguyễn Hoàng Anh me too.
@priyaravindran43374 жыл бұрын
SW Engineer for 7 years ...Computer Science graduate ...but understanding DSA concepts clearly now !! Thanks much !!
@sasaskvorc59410 жыл бұрын
Thank you very much for your efforts. If i get a programer job thanks to this videos i will make a donation as soon as i can. You are way better than my profesors. Keep up the good work.
@mycodeschool10 жыл бұрын
Saša Škvorc Thanks a lot and all the best to you :)
@aswin2pranav8 жыл бұрын
Doing the god's work really
@joycalcutta7 жыл бұрын
:D - really funny dude!
@vandananayak94262 жыл бұрын
I miss your videos sir. We all need a teacher like you. #respect
@FarhanAli-km5id3 жыл бұрын
I really really liked that video, because this tutorial provides"recursion method" as well as"Non recursion method" .. Thanks for that beautiful effort 💞.. from Pakistan...
@cdeba98674 жыл бұрын
I am devouring your course
@ktp69310 жыл бұрын
Very clean and easy to understand! Thanks!
@ኢትዬ5 жыл бұрын
You r a great teacher! Keep it up mate!
@MyStar9707 ай бұрын
Very well explained
@arunanshupadhi10 жыл бұрын
Great tutorials dude.. could you please upload a video on finding permutations of a string in c?
@wangchi562 Жыл бұрын
Please come back sir, we need you
@newoap10 жыл бұрын
Superb tutorials. What about creating a video on deleting from a BST?
@mycodeschool10 жыл бұрын
Owen Parkinson Yeah, I will create one on deleting node from BST. :)
@ridershubham10 жыл бұрын
the best tutorials!!! awsm work......plz prepare such a sereis for AVR Cprogramming...
@Gameplay-pq6hk8 жыл бұрын
please make videos for AVL TREE , THREADED ,B-TREE .
@Gurl975-b9o11 ай бұрын
Can u pl tell its complexity?!
@mersenne2486 Жыл бұрын
we don't need to use return in the last line, we can directly call the function, is it that using return reduces stack frame from growing as the last function ends before calling the new function
@prestoX6 жыл бұрын
Thanks a ton Sir Kindly upload some videos on Balancing trees and AVL trees.
@jaekim94969 жыл бұрын
Beautifully explained. Thank you so much.
@ujjwal94roy5 жыл бұрын
Very nice explanation
@jonsnow92467 жыл бұрын
Superb video..I have a doubt In the recursive approach,what happens to the paused function,wont they give an error return statement missing? because for the paused functions there is nothing below return FindMin(root->left); .........and return type of the function is int!
@Bhargava954 жыл бұрын
I have decided to give you a Nobel Prize!!
@ivannav6 жыл бұрын
Thanks, great vid!
@ShivamKendre-fc3su3 жыл бұрын
Great video
@Surbhi18115 жыл бұрын
I am in love with your videos...awesome
@SumitKumar-fn3gj5 жыл бұрын
And I am in love with you
@usama579266 жыл бұрын
amazing explanation
@tareqdevdiary4 жыл бұрын
How to call FindMin() function from main function? Which argument should I pass in FindMin() function?
@danielcarrera68134 жыл бұрын
pass the address of the root node
@akshay86754 жыл бұрын
To find the maximum or minimum element we have to provide the pointer to the root node no? how is it done?
@harmanpreetkaur591010 жыл бұрын
seriously awesome videos ..could u plz upload a video on graphs..
@mycodeschool10 жыл бұрын
Harmanpreet Kaur Yeah, I am a bit slow.. I am not getting the time. But Graph is next on my list. Expect some videos on Graph in August.
@chintandesai14369 жыл бұрын
How do we make sure that current -> left will actually traverse left and not right side ?
@5586manali9 жыл бұрын
when you say root can be used as a local variable, I tried the following code snippet. #include struct node { int data; struct node *next; }; void change_data(struct node *root) { root->data = 7; } int main() { struct node *root; root = (struct node*)malloc(sizeof *root); root->data = 5; change_data(root); printf(" root data:%d",root->data); } With your logic, changing root->data in change_data should not change the root in main function. however the output of this function is 7 not 5. Can you explain the same?
@vzfzabc9 жыл бұрын
Indeed, the answer you get is expected one. Because you are modifying the same chunk of the memory. You pass to the method change_data() an address(which is the reference to the malloced memory) that you keep at **root(pointer to pointer root), and this address is assigned as a value of the **root(pointer to pointer) that you have in change_data which is not equivalent to the **root in main. From the output of the following snippet, you will notice that **root in main() and change_data() is different, however the address they keep is the same. Hope, it helps. #include #include struct node { int data; struct node *next; }; void change_data(struct node *root) { printf("change: * %p ", root); printf("change: **%p ", &root); root->data = 7; } int main() { struct node *root; root = (struct node*)malloc(sizeof *root); root->data = 5; change_data(root); printf("main: * %p ", root); printf("main: **%p ", &root); printf(" root data:%d",root->data); }
@idamooooo9 жыл бұрын
+Manali Bhutiyani TL;DR answer: To get the result you are looking for, your function change_data(struct node *root) should return type struct node*. Then in your main, change to: root = root->data=5 That way, your main function is assigned to the address of the newly changed node.
@ryklin18 жыл бұрын
The only thing I do not like about this implementation is that negative integers can be stored in this tree, so returning -1 when the root is NULL creates a conflict. Instead, I think it would be better to throw an exception when the root is null. Does anyone have a better suggestion?
@goodToBeLost7 жыл бұрын
That's right. But any suggestions on what we could do if we know that the B.S.T can have negative values? :)
@odotodate6 жыл бұрын
You could return the minimum value of the Integer class. How you get that value depends on your language (i.e. Java = Integer.MIN_VALUE)
@inception2523 жыл бұрын
@@goodToBeLost XDDDD
@dattabezawada9734 жыл бұрын
Can I get a complete C# code for this
@aliiqbal3809 жыл бұрын
great work sir. :-)
@srividhyaparthasarathy54014 жыл бұрын
Why isn't the condition for while loop is not current!=null and y is it current->next!= Null?
@maroben2259 жыл бұрын
im confused ...if root->left ==NULL ..why wouldnt it go to the first if ( root ==null) ..instead of going to else if (root-left ==null) how will he reconize it ..isnt it a local variable !
@erehuchiha3034 жыл бұрын
Will it work for a right screwd tree where min element is root itself?
@akhilgupta36644 жыл бұрын
Yes it will definitely worked for all type of binary tree. As Left and Right skewed tree are also Binary tree as they have atmost 2 child actually one child except the leaf node which do not have a child node . So in case of skewed tree to find min in right skewed the first condition will itself true so we return root data as it is. Same in case of finding max in left skewed tree . Hope it helps !!
@tonyy086 жыл бұрын
So the minimum for this problem will be 2?
@kamlendratripathi89633 жыл бұрын
what is the time complexity of iterative and recursion approach
@SHIVANSHTHAKUR-cd6lv3 жыл бұрын
i think O(log(n)) for iterative, because we are dividing are problem by half at each step and may be same in recursion. Instead of big-O we can use theta as well because we are sure that it is the left most/right most element for min/max elements.
@victorstan48136 жыл бұрын
thank you very much, it helps me a lot!!
@denisr.82486 жыл бұрын
Good video man TXH a lot :P
@sumved12310 жыл бұрын
You are awesome! :)
@mohammedamaan73514 жыл бұрын
int FindMin(BstNode* root) { if (root == NULL) return -1; if (root->left) return FindMin(root->left); else return root->data; }
@akshay86754 жыл бұрын
To find the maximum or minimum element we have to provide the pointer to the root node no? how is it done?
@premkumarreddy6893 Жыл бұрын
thank u🤩
@hussainulhassan21994 жыл бұрын
thanks chachu
@alimahmood41585 жыл бұрын
kindly make a video on insert a node in bst
@jatinverma47886 жыл бұрын
why the root in main doesn't change when we are passing the address of root in Findmin()???
@jayantprakash64256 жыл бұрын
bcz we are passing root pointer by reference so function will have its own copy of root pointer, not affecting the original
@suneelabbigari4 жыл бұрын
Can someone provide all the possible operations (insert, delete, search, height, print infix , prefix and post fix order) with recursion in single program. Please use "root" as global variable...don't want to return pointer every time. struct node * root = NULL in global scope is must.
@usama579266 жыл бұрын
bro u return -1 if the tree is empty but think if the tree is not empty and the minimum value in tree is also -1 then it will return -1 so how can u manage this condition in main function.
@singhsarbjit5 жыл бұрын
There is an assumption in this example that he described - "Tree is storing only positive numbers"
@inception2523 жыл бұрын
i find it quite blank to test it anyone know?
@malathalaqrabawi78397 жыл бұрын
how to find the next min???
@khaledsaleh42386 жыл бұрын
I'd think to add another pointer ( let's call it Prev ) and go recursively through the whole left subtree till you find the leaf as he did in this video and just return Prev -> data instead; Hope this helps!