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

  Рет қаралды 397,349

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

Пікірлер: 900
@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 29 күн бұрын
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 6 ай бұрын
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. 🙏
@omgaikwad5962
@omgaikwad5962 Жыл бұрын
HI Striver, One request please provide the videos for upcoming topics asap and Big thank for providing such an amazing series.
@charlesbabbage6786
@charlesbabbage6786 4 ай бұрын
What an AMAZING teacher!!!
@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. ❤
@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 ❤
@siftainejaz4772
@siftainejaz4772 11 ай бұрын
UNDERSTOOD. THE WAY YOU TEACH IS BRILLIANT.
@hari7939
@hari7939 Жыл бұрын
mannnnn!!!! Just addicted to ur teaching🔥🔥, every little concept is crystal clear
@raimasoni3013
@raimasoni3013 Жыл бұрын
2:45 Selection Sort 17:41 Bubble Sort 31:40 Insertion Sort 😊
@takeUforward
@takeUforward Жыл бұрын
Thank you
@sukhpreetsingh5200
@sukhpreetsingh5200 Жыл бұрын
😅😅As usual awesome!!
@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
@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. ❤❤ ❤❤
@cinime
@cinime Жыл бұрын
Understood! Amazing explanation as always, thank you very much for your continuous effort for making the video!!
@universal-1903
@universal-1903 7 күн бұрын
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
@MohsinAli-zg3hr
@MohsinAli-zg3hr 11 ай бұрын
UNDERSTOOD. Thanks for giving us this course!
@ashwinikumarray__a2-255
@ashwinikumarray__a2-255 Жыл бұрын
Quality content.... Explained effectively and completely..
@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 4 күн бұрын
I want to understand how does is not give index out of bound error by accessing -1, or it does short curcuit
@sarthaksharma9322
@sarthaksharma9322 13 күн бұрын
Understood! Thanks Striver for all this knowledge you are providing for free!
@JazzSparrow0321
@JazzSparrow0321 3 ай бұрын
I find this is best DSA video i have ever seen on youtube. Thabak you Mr. TUF for this informative session.
@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.
@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 3 күн бұрын
Same doubt??
@harshavardhan184
@harshavardhan184 Жыл бұрын
Amazing yar.. please continue the series faster.. eagerly waiting to learn more!!!
@deepak8720
@deepak8720 8 ай бұрын
Understood. Thanks for your commitment. That in itself is amazing motivation to keep going.
@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
@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.
@tejasbisen6215
@tejasbisen6215 Жыл бұрын
I never seen before content where 🔥Crystal level concept Explained ✨Dope🔥
@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.❤
@valiz2628
@valiz2628 4 ай бұрын
its 2:20am at 10 am i have exam,so jai shree ram,aur jai baba raj
@Ankit-mg3ge
@Ankit-mg3ge Күн бұрын
College which year ??
@reddotcheese
@reddotcheese 4 ай бұрын
It's easiest explanation I have seen. Appreciate the effort that went.
@siddhatagadhe6176
@siddhatagadhe6176 Жыл бұрын
understood totally, literally I forgot my phone while your lecture. Thanks a lot
@066-roshankumar6
@066-roshankumar6 10 ай бұрын
Best Sorting video until Now THanks bhaiya...
@pranjalisingh7484
@pranjalisingh7484 Жыл бұрын
Motivated me today to solve questions again .... And learn ...
@sparshverma4030
@sparshverma4030 Жыл бұрын
Understood. Such an amazing course.
@milindjarsaniya
@milindjarsaniya 9 ай бұрын
PERFECTLY UNDERSTOOD! ❤
@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....
@shubhivishwakarma9331
@shubhivishwakarma9331 8 ай бұрын
you are amazing all the sorting you taught looks very easy after watching your vdo
@amareshghosh3502
@amareshghosh3502 6 ай бұрын
khub sundar, osadharon🙂
@roshninv
@roshninv 10 ай бұрын
Completed the sorting - I , thank you for the breif explaination bhaiya.
@ashokasamrat8375
@ashokasamrat8375 Жыл бұрын
As always excellent lecture ☺️☺️.
@prayushgiri6515
@prayushgiri6515 9 ай бұрын
understood!!! Thanks Striver bhaiya
@UserUser-tn8tv
@UserUser-tn8tv 9 ай бұрын
I just wanna say Thank U you are a big brother figure for me...
@muhammadzubair957
@muhammadzubair957 8 ай бұрын
Good Explanation in the Sorting algorithm. Thanks a Lot❤❤ Strivers
@changed217
@changed217 11 ай бұрын
Understood, thank you so much for the lecture and your efforts.
@priyanshushrivastava4453
@priyanshushrivastava4453 Жыл бұрын
great video and easy explanation helps a lot .
@fullstacker786
@fullstacker786 5 ай бұрын
understood it way better than anywhere else
@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.
@chiranjeebpanda8926
@chiranjeebpanda8926 27 күн бұрын
Understood. Best explanations for every sorting algo :)
@SubhashKumar-bj5xd
@SubhashKumar-bj5xd 11 ай бұрын
I really appreciate your effort. And your videos are helping me a lot. thank you sir🙏
@AbhishekChaurasiya-op6pq
@AbhishekChaurasiya-op6pq Ай бұрын
Understood everything and it became crystal clear topic
@ramraj72
@ramraj72 Жыл бұрын
So nice session bro..very well explained
@kirankumari-xx1rs
@kirankumari-xx1rs 4 ай бұрын
Thank you Striver, I am in my first year but I am learning a lot from you.
@user-vh7qb3zs4j
@user-vh7qb3zs4j 8 ай бұрын
your explanation is just Awesome. UNDERSTOOD
@rizwanshaikh4024
@rizwanshaikh4024 4 ай бұрын
Understood, thanks STRIVER
@ankitdhattarwal2286
@ankitdhattarwal2286 11 ай бұрын
thank you sir for good explanation and provide best dsa sheet and in this video i first time hear --- left chota -- , ( left small ) ---> at 38 : 40 😁😁 and again thank you sir ❤
@user-sc7vy3ye6v
@user-sc7vy3ye6v 29 күн бұрын
You are the best man... I donot know where this energy come from...
@ArvindSingh-wj7vy
@ArvindSingh-wj7vy 4 ай бұрын
Absolutely understood Stiver!💌
@anujsamdariya984
@anujsamdariya984 14 күн бұрын
Best Explaination of Insertion Sort!!!
@ummedchoudhary3977
@ummedchoudhary3977 10 ай бұрын
understood comfortably keep it up bro 💯
@VishalYadav-gk1kg
@VishalYadav-gk1kg 6 ай бұрын
Very Nice explanation sir, Thank you!
@anishchhabra6085
@anishchhabra6085 5 ай бұрын
Understood, great lecture.
@a_maxed_out_handle_of_30_chars
@a_maxed_out_handle_of_30_chars 7 ай бұрын
simple and to the point, thank you :)
@rishikeshg8926
@rishikeshg8926 7 ай бұрын
Understood Thanks for this video bhai!
@andor_andor
@andor_andor 7 ай бұрын
Great work, Striver. Best Free Resource
@DevashishJose
@DevashishJose Жыл бұрын
Understood. Thank you for your hard work.
@kimparajusivanagatrishuled1155
@kimparajusivanagatrishuled1155 7 күн бұрын
understood . Thanks for best explaination
@yeswanthb
@yeswanthb Жыл бұрын
awesome explanation STRIVER thankyou
@tvnalkkmgaargyreddy9548
@tvnalkkmgaargyreddy9548 13 күн бұрын
Explanation is amazing 😍
@shivamjaiswal1263
@shivamjaiswal1263 11 ай бұрын
Hats off to your effort and teaching skill striver. No one can explain as you were explaining topics🫡🫡🫡
@anvith-error
@anvith-error 9 ай бұрын
Thank you striver, amazing explaination.
@devanshimishra9786
@devanshimishra9786 7 күн бұрын
Thanks for this lecture finally understood those sorting techniques
@gulabchandgupta5486
@gulabchandgupta5486 Жыл бұрын
Best sorting explanation bhaiya ever i seen love from jamshedpur🤩☺
@srishtijha3
@srishtijha3 11 ай бұрын
Thankyou for putting out such valuable content
@NIKHILKUMAR-zg3us
@NIKHILKUMAR-zg3us 8 ай бұрын
understood Thank you so much for giving this fabulous course.
@hareshnayak7302
@hareshnayak7302 2 ай бұрын
Understood,thanks striver for this amazing video.
@jatilyadav4000
@jatilyadav4000 Жыл бұрын
Amazing Video.. thank you sir
@kumpatisupriya3947
@kumpatisupriya3947 6 ай бұрын
Great explanation......clear cut explanation👏👏👏
@jinhuang7258
@jinhuang7258 11 ай бұрын
Understood. You are the best!
@everythingabout3479
@everythingabout3479 4 күн бұрын
Thank you so much striver. Your each and every video is such nice 👍
@ReNaq313
@ReNaq313 7 ай бұрын
Amazing approaches 🔥🔥
@harshitshrivastava9121
@harshitshrivastava9121 Жыл бұрын
thanks for making this playlist
@waqas3051
@waqas3051 3 ай бұрын
Understood, Very well explained.
@SUBHASHINISV-nu9dq
@SUBHASHINISV-nu9dq Жыл бұрын
Waiting for merge and quick sort🤩🤩🤩🤩
@MuralidharanR-hl7gt
@MuralidharanR-hl7gt Жыл бұрын
Understood, And big thanks for all the videos.
@m.swetha7340
@m.swetha7340 Ай бұрын
Understood sir❤ plz make more videos it's really helpful sir🙏
@sarangkumarsingh7901
@sarangkumarsingh7901 5 ай бұрын
Awesome Sir......
@kingbadshah452
@kingbadshah452 5 ай бұрын
thanks for this lecture ,,,, understood everything
@shashamnk2525
@shashamnk2525 7 ай бұрын
folks that was 5:29 AM in striver's clock , please hit the like button for the efforts he makes for us , forever grateful.
@sagarkumawat2613
@sagarkumawat2613 Жыл бұрын
understood amazing explanation thankuuu sir
@devangsharma7550
@devangsharma7550 11 ай бұрын
understood!! amazing...
@kumaraditya7795
@kumaraditya7795 10 ай бұрын
Understood in a very good way
@fea25akshaygirase79
@fea25akshaygirase79 Жыл бұрын
great explanation sir💯💯
@Chandraprakash-kx4ic
@Chandraprakash-kx4ic 7 ай бұрын
Understood everything. Thank You very much:)
@gauravsrivastava17
@gauravsrivastava17 8 ай бұрын
UNDERSTOOD Insertion sort itna easily kabhi samjh ni aaya tha
@gokulkishore6366
@gokulkishore6366 4 ай бұрын
great bhai
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 55 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 4,3 МЛН
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 59 МЛН
Bubble Sort Algorithm - Theory + Code
46:37
Kunal Kushwaha
Рет қаралды 285 М.
Complete DSA Roadmap For Beginners 2024
2:47
thefourhourtalk
Рет қаралды 1,6 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 257 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,4 МЛН
Bubble Sort Code in Java | DSA
8:14
Telusko
Рет қаралды 29 М.
DSA & ₹1.2 Crore Per Annum Jobs - The Truth? (No Offence)
12:22
CodeWithHarry
Рет қаралды 524 М.
The Last Algorithms Course You'll Need by ThePrimeagen | Preview
16:44
Frontend Masters
Рет қаралды 307 М.
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 55 МЛН