It is ridiculous that I spent 70k+ at College for this and what my teacher has taught makes me confused. While this video makes things so clear, and I have not spend a penny for it! Thank you!
I don't know why mostly peoples run toward great institution like algoexpert website, MIT and Howard and paid huge amount of tuition fees.This is the real Algorithm Expert man deserve reward in case of donation to encourage his hard work and passion, honestly no one can teach like this Teacher.
Algoexpert is not an institution, it is just a few guys, and it is just 100 Dollars. It is well worth it. Abdul's courses are also well worth it, some just 12 Dollars.
abdul i really appreciate that you share this knowledge for us!, also im finishing ur c++ begginer to advanced course and lend me tell you you are the best teacher i ever seen, when i finish it i will continue with ur mastering data structures and algorithms with c & c++, please never stop building this quality content bless from colombia sir!
They need to name a tech-university after this man. Learned more from this 18 minute free video than I ever did from my $30k uni course. Thank you so much Sir
I have my Amazon SDE assessment coming up in a day & I am watching your videos on loop sir. Because no one can teach these concepts in the crystal clear way you do. Hope you continue making more videos on teaching the fundamentals in the best and basic way possible. Much love & respect for you sir! :) You're truly one of a kind!
I am not a person with a Com S background but started to study algorithms from books ... I did not understand anything out of that ....But after I saw these videos...I throughly understood the concepts.. I believe rather than reading any books or any other resources one should watch these videos and you will have clear knowledge of algorithms. .. Thank you so much Sir.... I truly mean it ...
Ma Sha Allah ap ka teaching method bohat zabardast hey. I even tried put MIT Open CourseWare leacture but found Sir Abul Bari awesome. In all his short lesson they made Algos easier for us to understand. Also the delivery of teaching methods are excellent. Jazak Allah
Honestly i was scared of algorithm , i was looking for courses, looking for help of my teachers, end of the day i was running from it, whem i was tired of it i even tried to read cormen, but nothing really helped. I know algorithm is a very important subject, and we can't neglect it, so i had to do it. I don't know without you how on earth i would do it,. I'm so thankful to you sir ,🙏🙏 please make more videos,.
No matter what I write, it will always fall short for the kind of teacher you are. Thank God, I found you sir. So overwhelmed by the simplicity, knowledge, clarity and those pauses! Thank you, for being available for ignorant students like us. 🙏🙏🙏
Great video. This is small adjustment, but I think a more exact answer for the average case of linear search will be Mu(n) = n/2 + n/(n+1). This is equal to n when n=1, and is just more than half otherwise. The reason for this adjustment is to count the probability of event(k not in array), when we also assume that each discrete event occurs with equal likelihood*. (1) Let Mu(n) be the average time for problem size n (2) The definition of mean is: Mu(x) = sum_over_x(x * p(x)), where x is the outcome and p(x) is the probability of that outcome (3) In the case of sequential search, mu(n) = (1/(n+1))*sum_over_i( i ) + (1/(n+1))*n NOTE: first term is outcomes where k is found in the array; second term considers the case where k is not found (4) Substituting (1/2)*n*(n+1) for the summation, and simplifying, we get Mu(n) = n/2 + n/(n+1) * This probably isn't a realistic assumption. P(k in array) = ? In reality we don't know and it depends on the instance of the problem. We would want to have some a priori estimate to feed into the calculations. Since k can take an infinite number of values, and i can take a finite number of values (1
best professor I could ask for, Dr. Bari, your Algorithm Analysis course has been a highlight of my academic journey. I've gained a deep understanding of best, worst, and average case analysis, and I'm eternally grateful for your expertise and patience. Your dedication to teaching and your unwavering support have made a significant impact on my life. Thank you for everything, and may God shower you with countless blessings.❤🔥
You posted tis vdo 3 yrs ago... But its very useful for semester xam within 3 yrs... Seriously i think why im not seeing this before.. Thank you so much for this... All algorithm topic is very much useful for me.. 💓
U r too cool as a tr.should .I M preparing for net exams.in the age of 36..&wants to earn respect for me nd for my parents,as I am a mother of 2yrs old daughter....i can learn excellent if u can teach like....pllllsssss continuous with whole topics of c.s sequentially......plssss guide me to achieve success...
Sir Its too good explanation on the other hand where I opted for NPTEL course on Design & Analysis Algorithm, its confusing me makes it too difficult. thanks once again sir..
Sir, literally i don't have any words. I thought that there is no way in which algorithm can be understood. My teacher made it too difficult that i even scarred after listening the name of algo. Thanks a lot for the lecture.
It was not easy for us to remember such cases we always forget at exam... Reason was that no one explain in MCA. Today I learn such complicated concepts in so simple language. Thank you 🙏
Sir came gave the best course and then vanished like he was never there loved his simplicity and the quality of content which he is offering for sure the best no one can get it even he pays for it
Even in university people won't teach like this. I will recommend this video to my juniors who is in college. Thanks for teaching with practical example sir.
Thank you very much sir , Today I read lots of articles and questions and answers about this topics. I didn't able to understand anything about from those. I read clrs but it didn't gave me an clear answer but you did sir.Thank you!
I was confused in understanding,what is worst,average,best cases in the algorithms,bt your vedio was really helpfull for me to get a clear idea ....so,sir thank you very much..👍👍👍I am from sri lanka
wow great sir, explanation made simple, our college lectures were just dumb lectures cant explain properly or make simple ,instead they made simple things complex
Hello +Abdul Bari, Thank you so much for all the videos... I wanted to understand this... You have max/min cases, best/worst case and then big-Oh/Theta/Omega notations. You clearly eliminated the confusion between notations and best/worst case saying any notation could be used for any case. But the confusion that now remains is that when I find out the order of a function for an algorithm, how do I know whether it is the best case/worst case or max/min that I am finding out.. Here in this video, you explained the difference between max/min using the difference in data structures of the two binary search trees. In another video in "1.5.3 Time Complexity of While and if #3", you computed the max, min (@16:07 in that video) of a while-if-else combo and then later computed best/worst case with an if-else-for (@19:25 in that video). So in my understanding, a) the best/worst case are clearly influenced by the presence of if-else conditions. 1. You showed that @19:25 in the "1.5.3 Time Complexity of While and if #3" video where "if" runs once (therefore the best case) and "else" runs into a for loop (and therefore the worst case) 2. You showed that in the linear search and the binary search tree by showing "if" my search is found in 1st or last iteration b) the max/min depends on the data structure being used: 1. you showed that in the two binary search trees in this video Confusion: If my understanding about the best/worst case and max/min is right, then I find the example in "1.5.3 Time Complexity of While and if #3" @16:07 of a while-if-else combo related to Best/Worst case and not max/min Is my understanding right? I am just trying to classify on a very high level..
@@abdul_bari Thank you for clearing that confusion... This particular statement: "Best and worst cases are for min and max time. But worst case can also have min/max time" clears things.. Then I think I can safely infer that ... in the GCD example from "1.5.3 Time Complexity of While and if #3": while (m!=n){ if(m>n) m=m-n; else n=n-m; } min O(1) also means Best case time and max O(n) also means Worst case time. Is my understanding right? Thank you for clearing all the doubts thus far.
one question : we take the "MID" item as "ROOT" But for a binary search ... the array should already be sorted... so when we take the MIDDLE item ... it will automatically divides the tree from the middle. lower values are on LEFT and higher VALUES are on right so the MAX worst case scenario you explained at 15:29 shouldn't be possible
what you are saying is true when we apply binary search on a sorted array, and what he is saying is true when we search an element in a bst. Although, a sorted array is also a form of bst, but still there is this difference in searching time.
In 13:14 you assume the elements of that binary search tree is 8 but it is 7 and you assuming that elements are 7 you evaluate the heights of the tree log 8 which is 3 but if we consider real elements exist on that binary search tree which is 7 then the height of the tree will be log 7 which is not equals to 3. So, can you explain this part in the reply of this comment ?
It is ridiculous that I spent 70k+ at College for this and what my teacher has taught makes me confused. While this video makes things so clear, and I have not spend a penny for it! Thank you!
70k$ or rupees?
@@xof8256 obvio rs
you got fleeced
Dragon it’s dollar buddy......that’s the average fees for undergrad in US
@@xof8256 how you know he is not indian
I don't know why mostly peoples run toward great institution like algoexpert website, MIT and Howard and paid huge amount of tuition fees.This is the real Algorithm Expert man deserve reward in case of donation to encourage his hard work and passion, honestly no one can teach like this Teacher.
Algoexpert is not an institution, it is just a few guys, and it is just 100 Dollars. It is well worth it. Abdul's courses are also well worth it, some just 12 Dollars.
It's not all about academic. It's connection, experience and degree paper
who is Howard lol
@@thoriqadillah7780 😂😂
Dude degree is diff 🤦♂️
And MIT,Howard are dope college
His content is so good , i did not skip the ad intentionally so that he earns all the money possible for creating such amazing videos
i did the same thing years ago , when i studied from physics wallah
abdul i really appreciate that you share this knowledge for us!, also im finishing ur c++ begginer to advanced course and lend me tell you you are the best teacher i ever seen, when i finish it i will continue with ur mastering data structures and algorithms with c & c++, please never stop building this quality content bless from colombia sir!
They need to name a tech-university after this man. Learned more from this 18 minute free video than I ever did from my $30k uni course. Thank you so much Sir
I have my Amazon SDE assessment coming up in a day & I am watching your videos on loop sir. Because no one can teach these concepts in the crystal clear way you do. Hope you continue making more videos on teaching the fundamentals in the best and basic way possible. Much love & respect for you sir! :) You're truly one of a kind!
Hey, how did it go?😃
@@infinitenotes1996 she got the job probably, and has no time to waste on writing youtube comments 😆
@@tanveerhasan2382 😂
I am not a person with a Com S background but started to study algorithms from books ... I did not understand anything out of that ....But after I saw these videos...I throughly understood the concepts.. I believe rather than reading any books or any other resources one should watch these videos and you will have clear knowledge of algorithms. .. Thank you so much Sir.... I truly mean it ...
rare to find such simple explanations on youtube. Keep it up Sir.
Ma Sha Allah ap ka teaching method bohat zabardast hey. I even tried put MIT Open CourseWare leacture but found Sir Abul Bari awesome. In all his short lesson they made Algos easier for us to understand. Also the delivery of teaching methods are excellent. Jazak Allah
brilliant
The 74 people who disliked are University teachers who are probably jealous.
🤣👏🏻
😂🤣👏
fr 🤣
Honestly i was scared of algorithm , i was looking for courses, looking for help of my teachers, end of the day i was running from it, whem i was tired of it i even tried to read cormen, but nothing really helped. I know algorithm is a very important subject, and we can't neglect it, so i had to do it. I don't know without you how on earth i would do it,. I'm so thankful to you sir ,🙏🙏 please make more videos,.
Hi baby
No matter what I write, it will always fall short for the kind of teacher you are. Thank God, I found you sir. So overwhelmed by the simplicity, knowledge, clarity and those pauses! Thank you, for being available for ignorant students like us. 🙏🙏🙏
@@XxxXxx-mi4wt kunayum kind vittik poda
Great video. This is small adjustment, but I think a more exact answer for the average case of linear search will be Mu(n) = n/2 + n/(n+1). This is equal to n when n=1, and is just more than half otherwise. The reason for this adjustment is to count the probability of event(k not in array), when we also assume that each discrete event occurs with equal likelihood*.
(1) Let Mu(n) be the average time for problem size n
(2) The definition of mean is: Mu(x) = sum_over_x(x * p(x)), where x is the outcome and p(x) is the probability of that outcome
(3) In the case of sequential search, mu(n) = (1/(n+1))*sum_over_i( i ) + (1/(n+1))*n
NOTE: first term is outcomes where k is found in the array; second term considers the case where k is not found
(4) Substituting (1/2)*n*(n+1) for the summation, and simplifying, we get Mu(n) = n/2 + n/(n+1)
* This probably isn't a realistic assumption. P(k in array) = ? In reality we don't know and it depends on the instance of the problem. We would want to have some a priori estimate to feed into the calculations. Since k can take an infinite number of values, and i can take a finite number of values (1
Your teaching style make this subject easy and interesting
pls make videos according to net syllabus. ur way of explaining things are in a very natural way....u r too cool
wow i'm working as Backend developer and preparing for my interview , this series is just awesome
Thanks Abdul Sir you explained it very well. Nowhere has this concept been explained all this well.
best professor I could ask for, Dr. Bari,
your Algorithm Analysis course has been a highlight of my academic journey. I've gained a deep understanding of best, worst, and average case analysis, and I'm eternally grateful for your expertise and patience. Your dedication to teaching and your unwavering support have made a significant impact on my life. Thank you for everything, and may God shower you with countless blessings.❤🔥
Ma Sha Allah ap ka teaching method bohat zabardast hey
You posted tis vdo 3 yrs ago... But its very useful for semester xam within 3 yrs... Seriously i think why im not seeing this before.. Thank you so much for this... All algorithm topic is very much useful for me.. 💓
this is just soooo good...amazing !! one of the best teachers in the universe
set the speed to 1.25 and You will be able to learn faster. Thanks for this video.
Thank you!
Rather 1.5 or 1.75 is better before exams :)
2X 🤙
Even 2× isn't enough!
I do it 10x
interesting to know about min/max worst case.. never knew this fact..
Sir, You are the gift of God Almighty for students....May God honour you not we as poor students.... Thank you very much Sir....
U r too cool as a tr.should .I M preparing for net exams.in the age of 36..&wants to earn respect for me nd for my parents,as I am a mother of 2yrs old daughter....i can learn excellent if u can teach like....pllllsssss continuous with whole topics of c.s sequentially......plssss guide me to achieve success...
You got my subscription throughout my engineering journey!
Sir Its too good explanation on the other hand where I opted for NPTEL course on Design & Analysis Algorithm, its confusing me makes it too difficult. thanks once again sir..
Is this course cover all the topic of design and analysis of algorithms?
by the way im taking this course now. I even wanted to take the NPTEL course.
How was that NPTEL course. Can you explain please?
wow! I am excited attended the 1.5-hour lecture and did not understand anything. here I understood it in minutes
Sir, literally i don't have any words.
I thought that there is no way in which algorithm can be understood. My teacher made it too difficult that i even scarred after listening the name of algo.
Thanks a lot for the lecture.
It was not easy for us to remember such cases we always forget at exam... Reason was that no one explain in MCA.
Today I learn such complicated concepts in so simple language. Thank you 🙏
I had never understood time complexity but this easy I am really amazed.
Thank you sir you are doing great work.
Hi baby
You are gem of a teacher Sir. You just solved my biggest confusion in time complexity analysis
Best teacher for algo i.e. algo expert i find in u tube ... Thnk u sir ❤️
True❤
Living legend...thank you sir for taughting such a complex data structues in a simple way......!!!!!!!!
Omg I was so confused about this topic but after watching this video I understood it so easily, thank you so much sir
sir really your teaching is excellent.Yesterday onwards iam seeing your videos because what my teacher has taught makes me confused.
Sir came gave the best course and then vanished like he was never there loved his simplicity and the quality of content which he is offering for sure the best no one can get it even he pays for it
Even in university people won't teach like this. I will recommend this video to my juniors who is in college. Thanks for teaching with practical example sir.
Proof that you don't need to pay a fortune on education. All that is needed is a computer, an internet connection and commitment. Great tutorials!
Great Job! Thanks for sharing it. Simple yet useful and memorable. Awesome
This is an amazing training video. Thank you Abdul!
you are speaking Indian English the way an Indian guru would speak it. i love you
you explained this better then the book the school told us to buy. TY
All computer science students will always be grateful to this legend for the rest of their lives🙏🙏🙏.
Thank you very much sir , Today I read lots of articles and questions and answers about this topics. I didn't able to understand anything about from those. I read clrs but it didn't gave me an clear answer but you did sir.Thank you!
A very easy and conveninent way of teaching that helps to learn faster.👌👌👌👌
sir you are the king of the algorithm,🙂🙂
this playlist is a gem
You're true gem Abdul Sir. ❤
I was confused in understanding,what is worst,average,best cases in the algorithms,bt your vedio was really helpfull for me to get a clear idea ....so,sir thank you very much..👍👍👍I am from sri lanka
Thank you Mr Bari, you've helped me a lot 👍
The best teacher of computer science ❤
wow great sir, explanation made simple, our college lectures were just dumb lectures cant explain properly or make simple ,instead they made simple things complex
Hat's off sir, a very crisp and clear explanation.
Thanks a lot sir....❤ from India..!!
Thank you, you are a very good teacher and I understood the subject thanks to you.
Algo was very tough for me...but if a teacher like you teaches subject..nothing is tough for students....thanks🙏❤
Best Algorithm Series Ever....
Sir, i must say you are the best!
Hello +Abdul Bari,
Thank you so much for all the videos... I wanted to understand this... You have max/min cases, best/worst case and then big-Oh/Theta/Omega notations. You clearly eliminated the confusion between notations and best/worst case saying any notation could be used for any case. But the confusion that now remains is that when I find out the order of a function for an algorithm, how do I know whether it is the best case/worst case or max/min that I am finding out.. Here in this video, you explained the difference between max/min using the difference in data structures of the two binary search trees. In another video in "1.5.3 Time Complexity of While and if #3", you computed the max, min (@16:07 in that video) of a while-if-else combo and then later computed best/worst case with an if-else-for (@19:25 in that video).
So in my understanding,
a) the best/worst case are clearly influenced by the presence of if-else conditions.
1. You showed that @19:25 in the "1.5.3 Time Complexity of While and if #3" video where "if" runs once (therefore the best case) and "else" runs into a for loop (and therefore the worst case)
2. You showed that in the linear search and the binary search tree by showing "if" my search is found in 1st or last iteration
b) the max/min depends on the data structure being used:
1. you showed that in the two binary search trees in this video
Confusion:
If my understanding about the best/worst case and max/min is right, then I find the example in "1.5.3 Time Complexity of While and if #3" @16:07 of a while-if-else combo related to Best/Worst case and not max/min
Is my understanding right? I am just trying to classify on a very high level..
@@abdul_bari Thank you for clearing that confusion... This particular statement: "Best and worst cases are for min and max time. But worst case can also have min/max time" clears things.. Then I think I can safely infer that ... in the GCD example from "1.5.3 Time Complexity of While and if #3":
while (m!=n){
if(m>n) m=m-n;
else n=n-m;
}
min O(1) also means Best case time
and max O(n) also means Worst case time.
Is my understanding right?
Thank you for clearing all the doubts thus far.
@@abdul_bari Thank you so much.. it has been a treat watching your videos
The best teacher of all time! Thank You
it is pleasure learning from u sir
thank you !
Thank you very much. You are a genius. 👍👍🙏🙏👌👌🔝🔝
Super Class. Very simple way explained the concepts.
This is one of the best explanation sir....Thank you for the video
Outstanding way of teaching.
One of the best trainer. Good work sir
I have never learned such a difficult concept so quickly in my life
the best teacher ever😇
Thanks for sharing, thumbs up abdul😊
prof you are the best i don't how can i say thank you to you
love you so much
thank you so much
Thank you and greetings from Brazil.
its is really amazing clear description . Keep it up
Thank you Adbul. This was really helpful.
Really awesome way of teaching,sir..👌🏻👌🏻
one question : we take the "MID" item as "ROOT"
But for a binary search ... the array should already be sorted...
so when we take the MIDDLE item ... it will automatically divides the tree from the middle. lower values are on LEFT and higher VALUES are on right
so the MAX worst case scenario you explained at 15:29 shouldn't be possible
what you are saying is true when we apply binary search on a sorted array, and what he is saying is true when we search an element in a bst. Although, a sorted array is also a form of bst, but still there is this difference in searching time.
I love your contest Sir!💯
Keep doing what you do best
Could I say for the worst case of binary search tree, time complexity is O(logN) and Ω(N)?
yes
I think it's opposite O(n) and big-omega(log n)
Thank you sir!!!
You are best🇮🇳🇮🇳
Thanks, very exhaustive presentation.
Thankyou Sir, I became frustrated try to understand best and worst case from my text book! But now it's sorted
Thank you very much for this video, keep it going Teacher
sir where are you keep posting this type of videos thank you so much for helping your content quallity is amazing ❤❤
This is amazing, Thank you so much sir. :)
thank you for your explanation, I will soon have exams so your Video helped me a lot. :D
Thanks for the great video! Would be even better if you can do a Worst-Case analysis on an unsuccessful search.
Very good... Excellent explanation. Thanks🌹
This is so clear I learned a lot
dont look at the dislikes!!!
sigmas always continue.
btw great video
I just enjoyed this ...Maja Aaya..
Best explanation 🔥
Thank you sir!
Thank you.your explanation is just fabulous 👌
I just found enlightenment, thank you.
Thank You So Much. You are so brilliant
Sir u made it very easy to understand
he is simply the best
😀
In 13:14 you assume the elements of that binary search tree is 8 but it is 7 and you assuming that elements are 7 you evaluate the heights of the tree log 8 which is 3 but if we consider real elements exist on that binary search tree which is 7 then the height of the tree will be log 7 which is not equals to 3. So, can you explain this part in the reply of this comment ?
May I ask if the logn should have ceiling function for the worst case time at 16:38?
the best teacher ever
Thisa is an amazing video. Thanks a lot sir
very simple explaind, thank you very much