I used all your videos when I was in the university studying for my Computer Sc degree. I'm working now and I just come back here to smile at how amazing of a teacher you are. Stay blessed!
@achajackson58982 жыл бұрын
@@Abdulrhman146. Honestly, efficiency and optimization counts only when you’re some sort of senior developer. This is actually what is used to different a pro dev from a beginner. Sometimes is not just about the solution, it’s about how good your solution is. So, if you’re just starting your job, relax you’ll learn and eventually understand because you follow this channel ; )
@ansh26472 жыл бұрын
Bro which channel is best for Daa?
@ubuntudebian37482 жыл бұрын
@TheOneAndOnly @Acha Jackson Hi everyone, first many thanx for Mr. AbdulBari. I remember this videos when i try to resolve a problem in Codingame last 2 week. The exercise is to write a simple method that take an array of int (size can be huge , ex 5_000_000 entrees or more) and return (int) the smallest range from its elements. Example : [7, 15, -7, 20, 100] -> return 5 because the range between 15 and 20 is the smallest one. [1, -15, 122, 2] -> 1 range between 1 and 2 Try to solve it and see the time difference between all solutions. Sorry for my bad english.
@chandukilari63702 жыл бұрын
@@achajackson5898 faak give me a job now....
@AbdulxamidFayziev Жыл бұрын
no bro , he looks so angry like I ain't got shit to say.
@masfiqmahmud1452 жыл бұрын
Sir didn't used music, any intro didn't waste any time, straight to the point. And his way of explaining I find it simply the best. I'm currently doing his udemy DSA and I find his way of teaching and explaining so easy. Huge respect for him.
@raunakkumar9460 Жыл бұрын
Kasa course hai theory part or coding?
@masfiqmahmud145 Жыл бұрын
@@raunakkumar9460সে সবগুলো টবে কি কভার করেছে থিউরি এবং কোডিং দুইটাই।
@batman_1st6 жыл бұрын
This channel is a youtube hidden gem
@samiamuhammad81405 жыл бұрын
exactly
@hasanrizvi20474 жыл бұрын
Hardy hidden, tbh. I type Algorithm on my YT search and his was the first playlist that popped up.
@NOOne-rs6pe3 жыл бұрын
@@hasanrizvi2047 english pe dhyaan de 66666ke
@birchetry4203 жыл бұрын
Ghanta ka gem .....kuch aata nhi isko waste of time
@geekyprogrammer48313 жыл бұрын
This is no more hidden. He got average views of 500k.
@ansuman42334 жыл бұрын
When you pause after a statement, it feels like I am actually physically sitting in the class and you are giving me a few seconds to grasp the information and proceeding after I have said Yes Sir! This feels so real! THANK YOU for doing this :) God bless you.
@AishLovesSpaghetti3 жыл бұрын
On point explanation.
@ajinkyadhotre35023 жыл бұрын
Time stamp
@prathamkhandelwal5745 Жыл бұрын
do you happen to have the notes of this course?
@pointerish5 жыл бұрын
I just love how he stops for a while after explaining something and looks at the camera like saying: "Did you understand, you fool?" :D
@pointerish5 жыл бұрын
@@abdul_bari Thank you for putting together this material. Your lessons are invaluable.
@nahidiac4 жыл бұрын
lol, I noticed it too. I have seen many old people do that while teaching something to their younger ones.
I read this comment before and den watched seriously i was more attentive to avoid me fool....but video is good..
@_Ahmed_154 жыл бұрын
lol same. It feels like you're actually in the class with him
@SunilSamantaSinghar11 ай бұрын
So beautiful explained. I am preparing fir exams & interview watching your videos. A little mistake at 5:30 f(n)= (n^2 + n) /2
@xteerfnie57243 жыл бұрын
I’m from Nigeria and I watch all the ads just to As a way of saying thank you 😂❤️
@abdul_bari3 жыл бұрын
Thanks Dear.
@shammahagwor92053 жыл бұрын
Hey Stephanie that’s definitely a cool thing to do , I do the same
@xteerfnie57243 жыл бұрын
@@shammahagwor9205 💕
@webuye3 жыл бұрын
On it too, he deserves it.
@ankitabasu814 жыл бұрын
Honestly everybody commented so accurately my feelings are exactly the same as every body in the comment section. I wish I could have got a teacher like you sir, when I was still in my college which ended the last month. Completed my graduation but this 'Time complexity' was not something which I understood for all my graduation years. But then discovering your channel and this lecture series ... make me feel blessed . Thanks a lot
@shivani-fq8eq3 жыл бұрын
u doing btech
@tattitatooo6553 жыл бұрын
Yeah
@Bikashics3 жыл бұрын
For those who are New here, I would like to say that this Teacher here, have helped millions of students to learn DS and grab product based companies... A Moment of Respect...
@simbamulenga54304 жыл бұрын
corona epidemic came when I just begun my major😢 your tutorials are really helping me thanks sir. You are great man👌
@esketirito2 жыл бұрын
I love it when you stare into my soul after finishing an answer
@acj108966 жыл бұрын
Best teacher I had ever seen...its like u born for teaching.. keep going sir..👍👍
@shivani-fq8eq3 жыл бұрын
u doing btech
@padmnabh36033 жыл бұрын
@@shivani-fq8eq i guess only btech students watch this.
@asim94482 жыл бұрын
@@padmnabh3603 noooooo
@indiancuriousvoice87732 жыл бұрын
This teacher is far better than the IIT teachers, He has a great ability to teach complex things In very simple way.
@rabiaaghafoor Жыл бұрын
?
@AnkitKumar-ge8st4 жыл бұрын
"Let us Analyze" every time whenever sir says this, there is a curiosity in my mind. Awesome Explanation
@shubhamsaini40125 жыл бұрын
The way he stops and look is a teacher look. Sir you nailed it...
@Azhagi-Transliteration-Apps6 жыл бұрын
What a Teacher! What a Teaching! In order to help my son understand O(n) fully well, I was searching for some videos. I was not satisfied with any of them until I found this video [and the series of videos on O(n) to follow this]. Mighty helpful - all of the videos in this series. My son (CSE first year) very quickly understood O(n) to the hilt. Once again, I reiterate: "What a Teacher! What a Teaching!" Pranams ever.
@Noushin3 жыл бұрын
Your channel is a hidden gem! I came from a different background and now studying computer science. I was having really hard time understanding these concepts in algorithm. Your videos just saved me. Big thumbs up! Keep bringing more videos like these. All the best to your channel. :)
@codingwithelhacen9904 жыл бұрын
I love the way Mr.Abdul bari teaches. He makes things understandable. His courses on C++ (Udemy) prove these traits.
@kowtrista64413 жыл бұрын
what link is it?
@ilovemisachan52312 жыл бұрын
I got a job sir. It was only possible because of your easy-to-understand explanation. I can remember from my 2nd year I actually was able to understand the concept of t.c. from these videos. Your Udemy's course on Data Structures was also crucial in building the base. Thanks for your teaching.
@GhDnFghDt1773 жыл бұрын
Thank you from Yemen, best channel to explain Algorithm and DataStructure
@Shubh225 жыл бұрын
Ooi that headmaster look in between the lectures! I imagined a flying duster :D. Jokes apart, this guys is a great teacher and he has raised the bar of how programming tutorials should be made.
@Abdullah-mg5zl Жыл бұрын
*Key Takeaways:* - time complexity analysis is basically trying to find out *how the number of instructions/steps required changes as a function of the input size* - you do this by basically seeing how many times each instruction/step of the algorithm/code executes for each input - if there is an instruction inside a for loop, and the for loop goes from 0 to n (n being the size of your input), then the instruction gets executed n times...this is pretty straightforward - if there is a for loop nested within a for loop, and both loops go from 0 to n, then the instruction in the *nested* loop will be executed n x n times. This is because the inner loop is executed n times, and each time the inner loop is executed, the instruction in it is executed n times, so in total, that instruction is executed n by n times - if you have an outter for loop that goes from 0 to n, but the inner for loop goes from 0 to i of the outter loop, let's take a look at how many times the inner loop code gets executed for each iteration of the outer loop. During the first iteration of the outter loop, the code in the inner loop gets executed 1 time (from 0 to i, which is 1). During the second iteration of the outter loop, the code in the inner loop gets executed 2 times (from 0 to i, which is now 2). During the third iteration, the code in the inner loop gets executed 3 times (from 0 to i, which is now 3), and so on. You basically have a little triangle here, with height n, and base n. To find the area, you do (n x n / 2) I may be off by 1, but I wanted to keep the explanation simple. Thanks again for the amazing videos
@zyadtarek11 Жыл бұрын
i read that with abdul bari voice specially when i read one time , i just want to say how amazing he is♥
@sereneorb Жыл бұрын
Thanks so much for writing this❤
@dominic9714 Жыл бұрын
I didn't get some of youtuber for outter loop like i
@rumanaislam4758 Жыл бұрын
Hello there! Can you please explain that (j
@niddynoddy Жыл бұрын
@@rumanaislam4758 I'm not sure I understand it fully either, but if you do go the manual route of trying to calculate how many times does the innermost statement of the two for loops run, you'd get that mathematical formula of (n(n+1))/2. If n is 10, the innermost statement is run 55 times following both manual calculations and the formula given. I'm still struggling finding out how exactly we got to that mathematical formulae.
@cristhianmalakian2966 жыл бұрын
I am from Colombia and I enjoy your videos :D
@VirulentVendetta6 ай бұрын
7:45 for those who were lost like I was when he immediately goes into setting P = k(k+1)/2... Look up the "Gauss Addition Trick". Essentially this is a recognized addition sequence (1+2+3... etc) that is represented by that equation. He's assuming we know how he got there, or forgot to explain it.
@PriyanshEm5 ай бұрын
thanks bro
@iamcarlostovias5 ай бұрын
This one got me for a little bit too, was thinking I missed something but it just wasn't explained! Lol. He did a great job regardless.
@Alexander-mm9qk5 ай бұрын
Thank you so much. I already had seen that concept years ago, and I never thought I'd use it 😂
@wafakahalerras3 ай бұрын
thank you; i take the expression "Gauss Addition Trick" and ask chatgpt to explain me🙏
@daliamahmoud3555Ай бұрын
thanksss
@islamkamran3324 жыл бұрын
Sir, I have seen the first person explaining this topic in so much detail with easy examples
@alexebarlescu95023 жыл бұрын
This guy is a legend, i can not find better person to explain this kind of topics
@WannaBe-215 жыл бұрын
When I get stuck on solution. Sir : Let us analyse!!!! Me: 😇😌😌
@manuvtomson80524 жыл бұрын
This is NIIIIICCCEEE.... once in a while we get to find teachers who love their job and enjoy teaching like this gentleman.....
@amith89rm4 жыл бұрын
Thank you so much Sir. Referred so many websites, blogs, wikis, spent hours to understand and your explanation made me get the concepts right within 10 minutes. Thank you so much Sir!!!
@zohayer.mehtab Жыл бұрын
Thank you. Finally, someone who can teach the things from the basics.
@RomanTimm5 жыл бұрын
Wow I think this is the by far one of the best videos on time complexity in code. Thank you so much for helping!
@droid-aman3 жыл бұрын
it was so , soothing,, to watch,, at 1x speed,, 1st time enjoying the deptness & deepness of an Experienced Teacher
@mustapharaimilawal80533 жыл бұрын
There are teachers and there are teachers !, you rate among the very best Sir, thanks for doing this video.
@dannggg2 жыл бұрын
im reviewing for interviews and stumbled upon your videos. youre the greatest.
@prost55143 жыл бұрын
I don't know what to say or how to describe your lessons in words, but I really understand this subject at once watching your videos, without any doubts you are far more better than my professors in the university
@iqraabdulrauf34024 жыл бұрын
I just love how he stops for a while after explaining something- the real teacher - BEST
@jos30084 жыл бұрын
1. Consider the following two functions. What are the time complexities of the functions? Please do explain and describe in details on how you derive the complexity of those two functions. int f1(int n) { if (n
@serhatsualp76925 жыл бұрын
Thanx alot from Turkey you should be instructor at university here dear AbdulBahri abi:)
@isotdemir53274 жыл бұрын
hangi üniversite :d
@isotdemir53274 жыл бұрын
@Beyond Oblivion where are you from
@mohammad_bilal9514 жыл бұрын
@@isotdemir5327 bende pakistanliyim xd:)
@mohammad_bilal9514 жыл бұрын
sagol kardeslar
@juhabach63713 жыл бұрын
he's an indian..he wont ever teach in turkey...fuck off!!
@bigdawg1025 Жыл бұрын
You got it Sir. i swear you're heaven sent. thank you very much for existing
@brandonasdfd32326 жыл бұрын
ABDUL, HAVENT STARTED THIS VIDEO AND YET YOU're SAVING MY LIFE LOL
@jacobsan4 жыл бұрын
MOHAMMED AVDURU !
@humengineerhaijholalekarni84084 жыл бұрын
@@jacobsan avdol
@subramaniyanvg63674 жыл бұрын
I never skipped the ads because of the effort you put into this video. Very nicely explained with examples thank you sir.
@pesetmekyok40383 жыл бұрын
as a programmer you should use adblocker :D but you re right he deserves it..
@sankaranarayanan3485 жыл бұрын
I'm so happy to view your courses. The way you explain make people to understand very clear. I would request you to publish the courses on entire data structures topics.
@tanbirrajhossain50469 күн бұрын
I could not understand O(root n) complexity before. When you showed me, I unlocked a new section in my brain. Amazing. :)
@subrothosamantha93316 жыл бұрын
Mera kal Abstract Algebra ka exam hai aur aaj mai Algorithms sikh raha hu. koi fikar nahi hai, atleast kuch tho samaj aaraha hai. ThankYou sir
@easytechtv25 жыл бұрын
The Sound of this Video is So Good. Its So Smooth. Not Annoying. THats Good. And The Style of Teaching of Sir is very Nice. Thanks
@Kinjen_ Жыл бұрын
... I am currently a cs student, and have been struggling with this to the point of panic attacks and dropping out. Or switching majors.... You might have just saved my degree.... Thank you
@GlitchingLater Жыл бұрын
NEVER BACK DOWN NEVER WHAT?
@notsohappy256511 ай бұрын
@@GlitchingLater NEVER GIVE UP!!!!!!!!!!
@adilnesar2912 жыл бұрын
In the first example The loop runs n times rather than ( n + 1) times. The first loop iteration has i = 0; the second has i = 1, and so on until the last loop iteration has i = (n - 1). When i = (n - 1), we reach the end of the loop. At this point, we go to the top and run i++. As a result, i = n. The loop condition is then checked. Because I
@abhinayyadav1002 жыл бұрын
Watch his previous video you will get ur answer... basically he is not taking about the statement inside the loop.
@prajunathunt5 жыл бұрын
Exam tomorrow, 1.5x speed
@shivamsompura15495 жыл бұрын
XD anyways I watch all videos at 1.25 now its normal for me. if i see 1X it seems very slow XD
@anirbansarkar66905 жыл бұрын
Me 2
@maneesh6854 жыл бұрын
@@shivamsompura1549 I READ THAT IN 2X SPEED
@haiderali-xz9se4 жыл бұрын
exam after one hour... speed 1.0 😋legends
@1aniket4 жыл бұрын
exam after 30 min and just reading comments :D ULTRA LEGENDS
@mahmudulislam53032 ай бұрын
I love your style of teaching. You make learning a topic easier to understand.
@Ffmomin007 Жыл бұрын
for(int i=0; i
@KrishnaKumar-b4m9p5 ай бұрын
yes absolutely correct u are
@Anand_Kumar885 ай бұрын
He wants to say condition is checked n+1 times But the loop statements will be executed n times
@oussamaokbani68613 ай бұрын
the line "for(i = 0; i < n; i++)" will run n+1 times because when "i = n" it has to check it one more time to see if "i < n" or not, when it finds out that the condition "i < n" is false it will not execute the "statement". That's why "for(i = 0; i < n; i++)" will run "n+1" times but "statement" will run just n times.
@gayathri-gd4bf4 жыл бұрын
beat DSA teacher I have ever seen. Explains concept very clearly. Thank you very much sir
@c.danielpremkumar84956 жыл бұрын
Wow ! I have never seen such a wonderful explanation on Big O, ....... so far. Wish I had seen this earlier
@smartknowledge20553 жыл бұрын
Best Study KZbin channel ever I found
@walterwhite01076 жыл бұрын
Nsquare +n by 2 at 5:52 . However degree of polynomial remains same
@aryaanju60422 жыл бұрын
Same doubt
@metrixalexandru6905 Жыл бұрын
You're the best. Thank you for all your videos about time Complexity. I tried to understand at College but you are superior then them!!!
@tathagata356 жыл бұрын
The videos are really amazing.....I'm overwhelmed
@dolasibrahim3823 жыл бұрын
I discovered this channel last month . May Allah blessed you. This channel is very useful for my education. Thanks for everything. Still keep watching
@ketkiambekar37893 жыл бұрын
@ 5:27 it should be (n^2 + n)/2 and not (n^2+1)/2. Thanks for making these freely available on youtube
@devinosborne33962 жыл бұрын
Yes! I found the same! Thanks for the free videos as well: :D
@armoorshailesh48912 жыл бұрын
@@devinosborne3396 for last problem ? how he got root n .why not n square.
@devinosborne33962 жыл бұрын
@@armoorshailesh4891 I think he just overlooked the second 'n' for the sake of simplicity!
@thetruthsayer83474 жыл бұрын
Thank you. Thank you. This by far the most detailed explanation I’ve come across on KZbin. I love how you break it down on the board
@jos30084 жыл бұрын
1. Consider the following two functions. What are the time complexities of the functions? Please do explain and describe in details on how you derive the complexity of those two functions. int f1(int n) { if (n
@ravindrashekhawat19894 жыл бұрын
"Tum Jo Aaye Zindagi Mein Baat Ban Gayi DSA Mazhab, DSA Meri Zaat Ban Gayi"
@RobertoMartinez-pz7im2 жыл бұрын
Best teacher ever. Thanks a lot for creating this channel and sharing your knowlege. I wish all the best in the world to you. Thanks again for helping me learning CS.
@faizalhasan69333 жыл бұрын
You are so wonderful. Pls start teaching again
@jerinkjohn5456 ай бұрын
7:37 for who did not understand the difference between k and n,assume n=10,then the loop runs for k times=4 times;p=1+2+3+4=10.That means k(value=4)
@anuragreddy80775 жыл бұрын
5:53 -->(n^2 +n)/2
@hunorvadasz-perhat60014 жыл бұрын
Thank you for the correction =D It also did not make sense to me.
@tubex13003 жыл бұрын
thanks master learning with you is more clear than រៀនពីវិមានទិព្វ
@alialmancie3 жыл бұрын
5:20 correction: (n(n+1))/2 = (n^2 + n)/2
@Whatever202373 жыл бұрын
Extremely helpful, and I am proven wrong time and time again that Indian teachers are the best.
@Eduardo-ow8mo3 жыл бұрын
at 5:49, actually F(n) = (n^2 + n) / 2 [instead of (n^2 +1) / 2], the result is the same since we only take care of the n with biggest exponential
@mearaftadewos85082 жыл бұрын
noticed that too. but yeaht its kind of neigligable error.
@Ameliacandycanegirl Жыл бұрын
Thank you I was confused 🙏
@narendramalviya82045 жыл бұрын
when i have any problem,i go to this chennel to find solution of problem in depth way,thanks for giving us the best thinks ever
@michamacioek7831 Жыл бұрын
Do you think that there's an error in the third example that starts around 2:50? In the time units calculation, in my opinion, instead of 1 + 2 +3 + ... + n, there should be 1 + 2 + 3 + ... + n-1. Because when i = n, the for loop will be terminated. What do you guys think?
@user-oh8fo2eq7s Жыл бұрын
yes ,you are correct. BUT in the video he told ......if the condition is less than equal to n, but he missed it. So, 1 + 2 +3+ ... + n is correct for i
@sakarmichel555611 ай бұрын
@@user-oh8fo2eq7s To @abdul_bari Thank you much for sharing your knowledge. Thank you so much for all the work that goes in the videos. Your videos are perfect! I would like to help keep them that way! Based on @user-oh8fo2eq7s and @michamacioek7831 said what do you think? Happy Holidays by the way.
@shiwhat53902 ай бұрын
it’s from 0 to n-1 so still n times
@kaipaprathap Жыл бұрын
You are earnest teacher explaining complex things in simple way
@Rockstar-xt5cw2 жыл бұрын
The best time complexity for his videos is watching in 1.5x speed😌
@niteshhebbare33395 жыл бұрын
Sir the way you teach complex algorithms so easily is just remarkable thank you sir!
@reazrahman18504 жыл бұрын
I got scared after he paused for few second. I thought he was gonna pick on me and I was thinking about the answer.
@TheSuperkiller145 жыл бұрын
Best teacher to explain data structures. No joke.
@ShawnDypxz3 жыл бұрын
Here's my explanation for the order of n^(1/2). So, when i=1, the program control goes inside the loop and the assignment statement (p=p+i) runs. This is the first time this statement executed. Let's keep track of i and p values. At first, when i =1, p =1. Now, move on to the second iteration. This time i=2 and p= (1+2). Now for the 3rd iteration, i=3 and p=1+2+3. Let's move on to fourth iteration. Now i=4 and p=1+2+3+4. Let's observe a pattern here. In total, we have run the assignment FOUR times till now which is exactly equal to the value of i. So when i= 10 (suppose) , the assignment statement will run 10 times. So when the value of i reaches k, the assignment will run for k times. We have to be aware that we are looking for how many times the assignment statement will run. So, that's k times. We found it but it's not as a function of n. So when i=k, p=(k(k+1))/2. It's a series formula for summing natural numbers upto k. This loop will stop when p>n. So (k^2+K)/2 > n . We solve this inequality and get k = (2n-k)^0.5. So, that's O(n^0.5).
@kwakubiney51753 жыл бұрын
Thanks
@rittikroy13422 жыл бұрын
Thanks man
@leandrawoods85682 жыл бұрын
Thank you! Thank you! Thank you!
@rushbh3452 Жыл бұрын
"We have to be aware that we are looking for how many times the assignment statement will run. So, that's k times." This! I needed to understand. thank you
@mowafkmha4505 Жыл бұрын
you are a true legend
@dreamer93756 жыл бұрын
2 minutes in and I already feel smarter. Thanks a ton, Sir!
@gaurav08835 жыл бұрын
Machine gun at 4:28 , watch in 2x
@WolFX_FPS Жыл бұрын
I love this guy, been watching your course on udemy and I have already given 5 star and a review, I have a Data Structures and Algorithms exam tomorrow and you've been so helpful in understanding the areas I have struggled with. Thanks Abdul!
@barkhadibraahim1023 Жыл бұрын
Bro the course in udemy and this are different or it is same
@WolFX_FPS Жыл бұрын
@@barkhadibraahim1023 slightly different
@omkard88784 жыл бұрын
5:30 The value of f(n) should be (n^2 + n) / 2. and NOT (n^2 + 1)/2
@muhammadakmalbinmohdsabri90364 жыл бұрын
sir, can you please explain to me why 1 + 2 + 3 + 4 +.....n = n(n+1)/2 ???? where n(n+1)/2 comes from?
@Omar-ic3wc4 жыл бұрын
@@muhammadakmalbinmohdsabri9036 n(n+1) /2 is a formula to calculate the sum , let's say you want to know the sum of the numbers from 1 to 4, so you have 1+2+3+4 the result is 10 right? Very easy indeed but what if we have a long list of numbers would you add them one by one? No that wouldn't be efficient right? So here comes the formula let's substitute N with the number 4 from the first example we have: 4*(4+1)/2 and here you have the same result from the sum one by one. I hope was clear enough, if you have any doubts tell me.
@muhammadakmalbinmohdsabri90364 жыл бұрын
@@Omar-ic3wc Ouh now i understand how its work, thank you very much on your explaination sir. Very helpful for me! 👍🙏
@Omar-ic3wc4 жыл бұрын
@@muhammadakmalbinmohdsabri9036 you are welcome :) have a great day
@MusikDenTV3 жыл бұрын
@@Omar-ic3wc Thanks alot for the clarity Omar i was almost losing track because of this.
@Minimal-gv3weАй бұрын
This man deserves millions of likes and subscriber.
@dipikamadan21493 жыл бұрын
5:25 why it's not n* (n(n+1)/2)? why first loop's n executions not considered?
@tegarpribadi65673 жыл бұрын
same question here..
@yashthakkar62313 жыл бұрын
That's because we are accounting for all of the j iterations for given i. Here, for each i, our j will get executed for different number of times. For e.g. for i=0, j will be executed for 0 times, then for i=1,1time, for i=2, 2 times and so on. Whereas, have a look at previous example, for each and every i, j is executed for n times, so we take it as (n+1)*(n) times for j and thus n*n times for the statement.
@pyaephyoeshein2 жыл бұрын
your teaching style is better than my university's. Thanks.
@heroalom12953 жыл бұрын
Sir in last program, you said i will run for k times, but actually value of p is deciding whether stmt has to be executed or not, when value of p is 6(which is greater than n) the stmt will not be executed. So if we see, i is executed for (1,2,3,4) i.e 4 times(n+1) and the statement p=p+i will execute for 3 times only. So the time complexity should be O(n).. is this correct or not?
@vinothn52052 жыл бұрын
What if n = 5, but the statement executed only 3 times, which is less than n. Similarly if n is very large number, then the statement will execute less than n. Here, the value of k is not exact it's just an approximate value.
@Rahulverma__3 жыл бұрын
Really not only good teacher but a excellent mentor 👏
@muhammedishaq9198 Жыл бұрын
an excellent
@kerryokpere80365 жыл бұрын
I had noticed a problem in 5:54 since it is a nested loop then the inner loop should run f(n) = n((n^2 + n) /2) making O(n) = n^3
@siddhantdash49555 жыл бұрын
its not the formula for inner loop, the summation that he did is for number of times the statement is going to execute and it will execute for order of (n2)
@Someone-wb8cc2 жыл бұрын
Thank you I have been stressing for 2 weeks and you have answered my prayers🙏🏽🙏🏽
@ashutoshjoge66644 жыл бұрын
5:30 ,sir, you have made incorrect multiplication of f(n). It should be f(n) = (n^2 + n )/2.
@Ghareonn4 жыл бұрын
I noticed that too. Although n would be dropped because it is smaller than n^2
@Polarwhite434 жыл бұрын
I’m not the only one then! I thought I wasn’t getting it right Thanks for your comment buddy
@xeboox4 жыл бұрын
i noticed that too but can you please tell me why he took the result and divided by 2 ??
@matpro04 жыл бұрын
@@xeboox he didn't. it's the formula for the sum of n natural numbers. 1+2+3+...+n= n(n+1)/2
@xeboox4 жыл бұрын
@@matpro0 It's cool when someone respond , thanks buddy
@merchant1003 жыл бұрын
You explained it much better than my university professor, thanks a lot man!
@manojthatipigari81764 жыл бұрын
R u watching in 2020
@habibullahkarimi67156 ай бұрын
2024 May 4😅
@eren20yearsago793 ай бұрын
No bro it's 2024
@abhilashadeshwar83824 жыл бұрын
I always have fear Of DSA but your lecture inspire me and try to complete all lecture .Ty so much sir 👍
@anjumaddi55955 жыл бұрын
sir shouldn't the function be n(n-1)/2 because 'i' cannot have value 'n'
@sayoojm34464 жыл бұрын
for i := 0; i < 10; i++ { for j := 0; j < i; j++ { fmt.Println("Times: ", ++times, " I value : ", i, " J value : ", j) times++ } Last OutPut : Times: 45 I value : 9 J value : 8 Yes Your are correct It should be n(n-1)/2
@rohithvishaal4 жыл бұрын
he later said i am taking n value also
@softwareengineer8923 Жыл бұрын
Your explanations are too clear and lucid!
@vinicius_7 Жыл бұрын
Thanks!
@sudaminis13022 жыл бұрын
What an amazing teacher! Greatly appreciate the clear explanations and enthusiasm!
@funtrip64915 жыл бұрын
5:54 f(n) = ( (n^2) + n ) / 2 , shouldn't n be mulitpled to 1 or am I missing something ?
@gouravsingh91465 жыл бұрын
Yup u r right !
@kerryokpere80365 жыл бұрын
I had noticed the same problem on 5:54 since it is a nested loop then the inner loop would run for f(n)= n((n^2) + n )/2 making O(n)=n^3
@PBNinja5 жыл бұрын
@@kerryokpere8036 its not O(n) = n^3 its O(n)=n^2 because the inner loop run at most N iterations and the external loop runs at most N iterations, but exactly: both loops were represented by the sum from 1 to N so there was no need to multiply again by N
@eddiebreezy21695 жыл бұрын
kerry okpere no it’s O(n) = n^2/3 and n/2 but we take n^2 because it is a more dominant contributor
@mhasnainadil28754 жыл бұрын
@@PBNinja Thank you for your explanation. Can you please explain me the logic behind dividing it by 2 ?
@thelastcrusaders63173 жыл бұрын
everytime he stops to look at the camera, he is secretly transfering info! thats why im learning so quickly!! cheeky guy...
@akankshakeshri18924 жыл бұрын
@5:50 see something?
@Ritesh_24014 жыл бұрын
Ya N(N+1) = N2+N not N2+1 👍👍
@anmoltrvd065 ай бұрын
He looks dangerous but teaches very calmly and beautifully
@naikjutt84084 күн бұрын
sir u are a great teacher i learn time complexity from urs vedio even mine professor cant teach me well thanks u sir may u ive long
@sidharth14523 жыл бұрын
Everything becomes easy if you got a good mentor. That's what I believe 👍