Sorting - Part 1 | Selection Sort, Bubble Sort, Insertion Sort | Strivers A2Z DSA Course

  Рет қаралды 403,471

take U forward

take U forward

Күн бұрын

Book a FREE career counseling session with Learnbay: bit.ly/3km2s6W
@Learnbay is an established EdTech platform with expertise in Data Science & AI and Full-Stack Development courses headquartered in Bengaluru.
They offer several IBM-certified Data Science courses. Since 2015, Learnbay has helped 10,000+ people to have a successful safe career transition.
Follow Learnbay platforms to stay connected for the latest updates & information: linktr.ee/Learnbay
#Learnbay #learnbaycourse #learnbayreview #learnbaydatascience #learnbaycoursereview #learnbaydatasciencecoursereview #learnbayfullstack
Notes/C++/Java/Python Codes:
Selection sort: takeuforward.org/sorting/sele...
Bubble Sort: takeuforward.org/data-structu...
Insertion Sort: takeuforward.org/data-structu...
Full Course: takeuforward.org/strivers-a2z...
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
0:00 Intro
2:45 - Selection Sort
6:50 - Pseudo code / implementation for Selection Sort
14:28 - C++ code for selection sort
17:41 - Bubble Sort
22:00 - Pseudo code / implementation for Bubble Sort
25:52 - C++ code for bubble sort
31:40 - Insertion Sort
36:55 - Pseudo code / implementation for Insertion Sort
38:52 - C++ code for Insertion Sort

Пікірлер: 909
@takeUforward
@takeUforward Жыл бұрын
Book a FREE career counseling session with Learnbay: bit.ly/3km2s6W Let's march ahead, and create an unmatchable DSA course! ❤ Can someone please add timestamps, I will add them post-it.
@sweetyjain8204
@sweetyjain8204 Жыл бұрын
Hey @striver @take U forward , it's a humble request can u, please complete this series soon as the placement season is coming soon....🙏
@Vikash-zq7vx
@Vikash-zq7vx Жыл бұрын
Hey Striver please complete the series.
@mgfreefirelover4471
@mgfreefirelover4471 Жыл бұрын
@takeUforward Hey! Can you complete Binary search Section more quickly
@aniltandivitb4482
@aniltandivitb4482 Жыл бұрын
Bhaiya , if we solve a question and if need to sort the array then which algo we would to implement
@webtestingui7187
@webtestingui7187 Жыл бұрын
Kaha thay aap,maine itna YT me search kia but aapka channel suggest nahi huwa until mera ek dost ne nahi bola hota Maira DSA teacher ne jo topic clear nahi karwa pa a aap wo kar di a Thank you
@saurabh8260
@saurabh8260 Жыл бұрын
A lot of problems are going on in my life right now. But still I'm showing up everyday to learn something new in dsa and to solve questions. Problems will come and problems will go but I should continue my hustle. All of our struggles will pay off one day.
@dhruvrajsinhgohil6715
@dhruvrajsinhgohil6715 Жыл бұрын
Hope is the most precious thing do not lost it
@darshanakv4946
@darshanakv4946 2 ай бұрын
Beautiful message that I saw today!
@pulkit-rastogi97
@pulkit-rastogi97 2 ай бұрын
This motivate me, I am going through some similar situation
@SauravSingh-xm6nn
@SauravSingh-xm6nn Ай бұрын
@@pulkit-rastogi97 don't lose your hope , just keep giving your best so that you won't regret, in fact if you honestly give your best you can , you are likely to succeed !
@vaibhavagarwal602
@vaibhavagarwal602 Ай бұрын
Same man, i was struggling to get up from bed the entire day. But finally at 11pm i decided i will atlest spend the last hout of my day working towards my financial independece
@msdarshankirthic9990
@msdarshankirthic9990 Жыл бұрын
Selection Sort TC -> worst - O(N^2) best - O(N^2) 2:45 - Selection Sort 6:50 - pseudo code / implementation for selection sort 14:28 - C++ code for selection sort Bubble Sort TC -> worst - O(N^2) best - O(N) 17:41 - Bubble Sort 22:00 - pseudo code / implementation for bubble sort 25:52 - C++ code for bubble sort Insertion Sort TC -> worst - O(N^2) best - O(N) 31:40 - Insertion Sort 36:55 - pseudo code / implementation for insertion sort 38:52 - C++ code for insertion sort
@afzalmd23
@afzalmd23 7 ай бұрын
Thinking about your notes📝 😮😮
@chhavigoel7030
@chhavigoel7030 7 ай бұрын
So many videos on Sorting on the internet yet this proves to be the BEST. Thank you so much.
@hypernova5159
@hypernova5159 11 ай бұрын
The amount of effort you put in these videos is truly amazing. Thanks a lot 🙏
@aydasu
@aydasu Жыл бұрын
Striver, you are a gift to us all! thanks so much!
@nandhakrishna2330
@nandhakrishna2330 7 ай бұрын
The amount of effort you put in these videos is truly amazing. 🙏
@charlesbabbage6786
@charlesbabbage6786 4 ай бұрын
What an AMAZING teacher!!!
@raimasoni3013
@raimasoni3013 Жыл бұрын
2:45 Selection Sort 17:41 Bubble Sort 31:40 Insertion Sort 😊
@takeUforward
@takeUforward Жыл бұрын
Thank you
@omgaikwad5962
@omgaikwad5962 Жыл бұрын
HI Striver, One request please provide the videos for upcoming topics asap and Big thank for providing such an amazing series.
@Manishgupta200
@Manishgupta200 Жыл бұрын
Thankyou Striver. It's really an easy to understand. I also learnt to find Time Complaxity from every code by myself after seeing this video. Please make video on other sorting methods. ❤
@siftainejaz4772
@siftainejaz4772 11 ай бұрын
UNDERSTOOD. THE WAY YOU TEACH IS BRILLIANT.
@sarthaksharma9322
@sarthaksharma9322 17 күн бұрын
Understood! Thanks Striver for all this knowledge you are providing for free!
@sukhpreetsingh5200
@sukhpreetsingh5200 Жыл бұрын
😅😅As usual awesome!!
@MohsinAli-zg3hr
@MohsinAli-zg3hr 11 ай бұрын
UNDERSTOOD. Thanks for giving us this course!
@hari7939
@hari7939 Жыл бұрын
mannnnn!!!! Just addicted to ur teaching🔥🔥, every little concept is crystal clear
@sumitvishwkarma6907
@sumitvishwkarma6907 Жыл бұрын
This is going to be one of the best series of all time, thankyou so much raj bhaiya, just a small request can you please upload new videos asap, btw thankyou again ❤
@milindjarsaniya
@milindjarsaniya 9 ай бұрын
PERFECTLY UNDERSTOOD! ❤
@codingfunda1813
@codingfunda1813 Жыл бұрын
Bhaiya I am following your dsa AtoZ sheet.From 2 day i am trying to understand sorting concept but now it's become clear. Lots of love
@ashwinikumarray__a2-255
@ashwinikumarray__a2-255 Жыл бұрын
Quality content.... Explained effectively and completely..
@cinime
@cinime Жыл бұрын
Understood! Amazing explanation as always, thank you very much for your continuous effort for making the video!!
@universal-1903
@universal-1903 10 күн бұрын
bro in insertion ,why does i has starting value of 0 ,shouldnt it be 1 as single element would be sorted anyways
@animexworld6614
@animexworld6614 Жыл бұрын
Hey striver , it's a humble request can u, please complete this series soon as the placement season is coming soon....🙏
@bishalkundu7592
@bishalkundu7592 Жыл бұрын
Yes striver 😭 plzzz Want to learn the whole series just from u. Already watched DP and Graph and Trees playlist from ur channel. Plzz striver try to complete this series as soon as possible 😭
@harshavardhan184
@harshavardhan184 Жыл бұрын
Yes please 🥺🥺🥺
@venomhighs1937
@venomhighs1937 Жыл бұрын
brother once striver reaches to Poland he will be regular in posting videos !!
@yikes3807
@yikes3807 Жыл бұрын
@@bishalkundu7592 u completed DP graph trees and you are waiting for basic topics?
@bishalkundu7592
@bishalkundu7592 Жыл бұрын
@@yikes3807 Not basic but ya heaps Sliding windows stacks Queues Binary Search. Waiting for this
@surajgoraicse
@surajgoraicse 8 ай бұрын
Finally I found the best DSA course on KZbin. ❤The way you explain concept is awesome. ❤❤ There was not a single second when I felt bored . Thankyou very much for your effort. ❤❤ ❤❤
@deepak8720
@deepak8720 8 ай бұрын
Understood. Thanks for your commitment. That in itself is amazing motivation to keep going.
@shivamsingh-we7ek
@shivamsingh-we7ek Жыл бұрын
please complete this series soon because only 3,4 months are left for placement season its a humble request
@Raj10185
@Raj10185 Жыл бұрын
one suggession for insertion sort why we run outerloop from i = 0 we should start directly from i = 1 till iarr[j]) { int temp = arr[j]; arr[j]=arr[j-1]; arr[j-1]=temp; j--; }
@AryanRishi-vk6et
@AryanRishi-vk6et Ай бұрын
it wouldn't impact anything if the outer loop is running from 0 to n-1 then when i = j = 0 it will no go into the while loop and move on to next iteration of i
@dhruvverma1001
@dhruvverma1001 8 күн бұрын
I want to understand how does is not give index out of bound error by accessing -1, or it does short curcuit
@sparshverma4030
@sparshverma4030 Жыл бұрын
Understood. Such an amazing course.
@JazzSparrow0321
@JazzSparrow0321 3 ай бұрын
I find this is best DSA video i have ever seen on youtube. Thabak you Mr. TUF for this informative session.
@yashvardhansingh5341
@yashvardhansingh5341 2 ай бұрын
For bubble sort striver you are using i>=1 in outer loop in the pseudo code but while using the code editor you are using i>=0.
@ankitpal8044
@ankitpal8044 6 күн бұрын
Same doubt??
@nirbhaybhardwaj4330
@nirbhaybhardwaj4330 2 күн бұрын
there is no need of going till i>=0 . but if you go , this is also right .....i=0 is automatically got minimum number when we are sorting
@28_g_pawanvinayakawasthi23
@28_g_pawanvinayakawasthi23 7 ай бұрын
Hi Striver @takeUforward , in the insertion sort ,the outer loop i.e. the loop with i should start with i=1 instead of i=0 because the j takes the value of i and in the while loop it says j should be greater than 0 so it will always stand false for the first iteration ( j=i=0) and moreover we don't need to check the correct order of single element . Please correct me if i am wrong because i am just saying what I understood .
@ShubhraneelChakraborty-cj8zm
@ShubhraneelChakraborty-cj8zm 5 ай бұрын
Yeah you are right I believe. When I saw the outer loop, I was thinking the same thing and when I run the code, it prints the same output as with i=0, just as I thought it would be during the dry run.
@066-roshankumar6
@066-roshankumar6 10 ай бұрын
Best Sorting video until Now THanks bhaiya...
@harshavardhan184
@harshavardhan184 Жыл бұрын
Amazing yar.. please continue the series faster.. eagerly waiting to learn more!!!
@nashimbiswakarma
@nashimbiswakarma Жыл бұрын
Otimization: 39:14 Guys run outer loop from int i=1 because there is no way to check first element with left .
@ramrawat681
@ramrawat681 Жыл бұрын
Yes that how we can also make best case complexity to O(1) by Initializing cnt =0 in outer loop and in while loop we do cnt++ and if while loop never run (best case ) then cnt remain at zero then in outer loop give a condition if (cnt==0) break;
@jaypandya2227
@jaypandya2227 2 ай бұрын
@@ramrawat681 no buddy we can't that's an error in video i think because while loop is running for every single element and if the element is in correct position means there's no greater element before it cnt will be zero and if you break the loop no elements after that will be checked so it will not give right answer i wonder if you implemented it successfully
@valiz2628
@valiz2628 4 ай бұрын
its 2:20am at 10 am i have exam,so jai shree ram,aur jai baba raj
@Ankit-mg3ge
@Ankit-mg3ge 5 күн бұрын
College which year ??
@tejasbisen6215
@tejasbisen6215 Жыл бұрын
I never seen before content where 🔥Crystal level concept Explained ✨Dope🔥
@MitaliMaurya-k4x
@MitaliMaurya-k4x 2 күн бұрын
Thankyou for your efforts! Dsa scares me, but you are making it easy for me
@anshulkahar1891
@anshulkahar1891 Жыл бұрын
Striver any rough idea how long will this a2z course will go
@takeUforward
@takeUforward Жыл бұрын
4/5 months, as the advanced section is completed, so its just the basics I need to complete. We will gain speed once am back in Europe in feb 4th weeek
@Lucifer-xt7un
@Lucifer-xt7un Жыл бұрын
@@takeUforward hey brother can we expect this series will be done by may last.
@rizwanshaikh4024
@rizwanshaikh4024 4 ай бұрын
Understood, thanks STRIVER
@reddotcheese
@reddotcheese 4 ай бұрын
It's easiest explanation I have seen. Appreciate the effort that went.
@suryaprakashiitbhu191
@suryaprakashiitbhu191 6 ай бұрын
Striver, Your content is truly outstanding and incredibly informative! Always thank you for your relentless hard work and consistently delivering the best content.❤
@user-vh7qb3zs4j
@user-vh7qb3zs4j 8 ай бұрын
your explanation is just Awesome. UNDERSTOOD
@ashokasamrat8375
@ashokasamrat8375 Жыл бұрын
As always excellent lecture ☺️☺️.
@shubhivishwakarma9331
@shubhivishwakarma9331 8 ай бұрын
you are amazing all the sorting you taught looks very easy after watching your vdo
@prayushgiri6515
@prayushgiri6515 9 ай бұрын
understood!!! Thanks Striver bhaiya
@ArvindSingh-wj7vy
@ArvindSingh-wj7vy 4 ай бұрын
Absolutely understood Stiver!💌
@pranjalisingh7484
@pranjalisingh7484 Жыл бұрын
Motivated me today to solve questions again .... And learn ...
@anishchhabra6085
@anishchhabra6085 5 ай бұрын
Understood, great lecture.
@siddhatagadhe6176
@siddhatagadhe6176 Жыл бұрын
understood totally, literally I forgot my phone while your lecture. Thanks a lot
@amareshghosh3502
@amareshghosh3502 6 ай бұрын
khub sundar, osadharon🙂
@chiranjeebpanda8926
@chiranjeebpanda8926 Ай бұрын
Understood. Best explanations for every sorting algo :)
@AbhishekChaurasiya-op6pq
@AbhishekChaurasiya-op6pq Ай бұрын
Understood everything and it became crystal clear topic
@UserUser-tn8tv
@UserUser-tn8tv 9 ай бұрын
I just wanna say Thank U you are a big brother figure for me...
@a_maxed_out_handle_of_30_chars
@a_maxed_out_handle_of_30_chars 8 ай бұрын
simple and to the point, thank you :)
@roshninv
@roshninv 10 ай бұрын
Completed the sorting - I , thank you for the breif explaination bhaiya.
@fullstacker786
@fullstacker786 5 ай бұрын
understood it way better than anywhere else
@jinhuang7258
@jinhuang7258 11 ай бұрын
Understood. You are the best!
@VishalYadav-gk1kg
@VishalYadav-gk1kg 6 ай бұрын
Very Nice explanation sir, Thank you!
@kimparajusivanagatrishuled1155
@kimparajusivanagatrishuled1155 10 күн бұрын
understood . Thanks for best explaination
@priyanshushrivastava4453
@priyanshushrivastava4453 Жыл бұрын
great video and easy explanation helps a lot .
@changed217
@changed217 11 ай бұрын
Understood, thank you so much for the lecture and your efforts.
@anvith-error
@anvith-error 9 ай бұрын
Thank you striver, amazing explaination.
@muhammadzubair957
@muhammadzubair957 8 ай бұрын
Good Explanation in the Sorting algorithm. Thanks a Lot❤❤ Strivers
@tvnalkkmgaargyreddy9548
@tvnalkkmgaargyreddy9548 16 күн бұрын
Explanation is amazing 😍
@user-sc7vy3ye6v
@user-sc7vy3ye6v Ай бұрын
You are the best man... I donot know where this energy come from...
@yeswanthb
@yeswanthb Жыл бұрын
awesome explanation STRIVER thankyou
@luckshaeey
@luckshaeey Жыл бұрын
Perfect!
@jatilyadav4000
@jatilyadav4000 Жыл бұрын
Amazing Video.. thank you sir
@devangsharma7550
@devangsharma7550 Жыл бұрын
understood!! amazing...
@DevashishJose
@DevashishJose Жыл бұрын
Understood. Thank you for your hard work.
@sarangkumarsingh7901
@sarangkumarsingh7901 5 ай бұрын
Awesome Sir......
@ramraj72
@ramraj72 Жыл бұрын
So nice session bro..very well explained
@anujsamdariya984
@anujsamdariya984 18 күн бұрын
Best Explaination of Insertion Sort!!!
@NIKHILKUMAR-zg3us
@NIKHILKUMAR-zg3us 9 ай бұрын
understood Thank you so much for giving this fabulous course.
@ReNaq313
@ReNaq313 7 ай бұрын
Amazing approaches 🔥🔥
@SubhashKumar-bj5xd
@SubhashKumar-bj5xd 11 ай бұрын
I really appreciate your effort. And your videos are helping me a lot. thank you sir🙏
@rishikeshg8926
@rishikeshg8926 7 ай бұрын
Understood Thanks for this video bhai!
@hareshnayak7302
@hareshnayak7302 2 ай бұрын
Understood,thanks striver for this amazing video.
@waqas3051
@waqas3051 3 ай бұрын
Understood, Very well explained.
@harshitshrivastava9121
@harshitshrivastava9121 Жыл бұрын
thanks for making this playlist
@thegeniusandsmartboys3757
@thegeniusandsmartboys3757 2 ай бұрын
understood. superb channel
@ummedchoudhary3977
@ummedchoudhary3977 10 ай бұрын
understood comfortably keep it up bro 💯
@curs3m4rk
@curs3m4rk 3 ай бұрын
This is a very good explanation. With help of explanation itself I'm able to code and did the sorting. Really appreciate the efforts.
@srishtijha3
@srishtijha3 11 ай бұрын
Thankyou for putting out such valuable content
@andor_andor
@andor_andor 7 ай бұрын
Great work, Striver. Best Free Resource
@shivamjaiswal1263
@shivamjaiswal1263 Жыл бұрын
Hats off to your effort and teaching skill striver. No one can explain as you were explaining topics🫡🫡🫡
@priyansh6676
@priyansh6676 5 ай бұрын
truly amazing
@snehapawar1688
@snehapawar1688 6 ай бұрын
You are the best!!
@mrnobody4365
@mrnobody4365 Ай бұрын
Understood. Thank you!
@devanshimishra9786
@devanshimishra9786 11 күн бұрын
Thanks for this lecture finally understood those sorting techniques
@kirankumari-xx1rs
@kirankumari-xx1rs 4 ай бұрын
Thank you Striver, I am in my first year but I am learning a lot from you.
@gaganvasanth9280
@gaganvasanth9280 7 ай бұрын
Perfectly understood!
@rituraj2636
@rituraj2636 23 сағат бұрын
Amazing content :)
@ShubhamSharma-zq2xn
@ShubhamSharma-zq2xn 2 ай бұрын
Stirver-Forever, Just striving to become the best version of myself. All thanks to raj vikrmaditya bhaiya. You're the best hope for students like us, belonged from tier-3 college, where there is no hope in hell to get a sde job, but their is this man standing with a freakin Sun the light the path for use. I don't know how I will thank you but one day I believe all my hard work will pay off when I will meet you and telling you my story of life, how I made zero to Prodigy. Till I didn't hit it, byy sir I am going back to hustle....
@hardikpatel352
@hardikpatel352 11 ай бұрын
understood!!! thanks legend.
@shaikmudassirali7202
@shaikmudassirali7202 10 ай бұрын
Bro seriously Love You 💘💘
@kumaraditya7795
@kumaraditya7795 10 ай бұрын
Understood in a very good way
@Chandraprakash-kx4ic
@Chandraprakash-kx4ic 7 ай бұрын
Understood everything. Thank You very much:)
@nirajshaw4724
@nirajshaw4724 Жыл бұрын
Crystal clear 😁👍
@poojaraman6663
@poojaraman6663 3 күн бұрын
Understood sir...thank you😇
@Marvelous_maverick
@Marvelous_maverick 17 күн бұрын
Understood clearly.
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 74 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 23 МЛН
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 108 МЛН
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 607 М.
Minecraft Doesn't Get More Confusing
9:07
Shalz
Рет қаралды 145 М.
ГОЛОВОЛОМКА 2 БУК
12:16
Маша LIL_P
Рет қаралды 125 М.
Жди меня | Выпуск от 28.06.2024 (12+)
45:41
Жди Меня
Рет қаралды 230 М.
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 290 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 750 М.
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 74 МЛН