Selection Sort Algorithm

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • Selection Sort Algorithm in Hindi: In this Data Structures and Algorithms video we will see how selection sort works and how we can use selection sort to sort the array of size n. We will analyze and see how many comparisons and swaps this algorithm takes to arrive at the time complexity!
    ➡Download Source Code & Notes here: codewithharry....
    ➡Join this DS & Algo course & Access the playlist: • Data Structures and Al...
    ►Checkout my English channel here: / programmingwithharry
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Python Tutorial In Hin...
    ►Python Complete Course In Hindi - • Python Tutorials For A...
    ►C Language Complete Course In Hindi -
    • C Language Tutorials I...
    ►JavaScript Complete Course In Hindi -
    • JavaScript Tutorials I...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Django Complete Course In Hindi -
    • Python Django Tutorial...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithhar...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

ความคิดเห็น • 367

  • @CodeWithHarry
    @CodeWithHarry  3 ปีที่แล้ว +829

    Very few people have followed the playlist till here. But dont worry chahe 100 views aaye ya 1 view aaye course poora khatam karunga!

    • @Sub-sw4zd
      @Sub-sw4zd 3 ปีที่แล้ว +14

      Best content on TH-cam
      All the best👍

    • @harshitrathi3077
      @harshitrathi3077 3 ปีที่แล้ว +10

      Thankyou Bhaiya. We Will support you till the end. And Dont worry Views Dheere dheere aajyengey, you keep On Uploading....... Just wait and watch Till the end of 2020 you will have 1M Subscribers And 10Lakhs Views On Dsa Playlist

    • @samyak235
      @samyak235 3 ปีที่แล้ว +1

      Dedication of Harry :o .

    • @harshitrathi3077
      @harshitrathi3077 3 ปีที่แล้ว +1

      Quick Sort and Merge Sort is Only Left Now

    • @asty8488
      @asty8488 3 ปีที่แล้ว +1

      Sir muja 10th ka bad coding la ne ha kya lu ma pls reply

  • @sagar8880
    @sagar8880 3 ปีที่แล้ว +70

    this man is damn underrated in his teaching skills

  • @shatviksmit3388
    @shatviksmit3388 2 ปีที่แล้ว +14

    19:18
    No, Selection sort is not adaptive as it will do all the comparisons as done in the case of unsorted array

  • @IamZaxs
    @IamZaxs 3 ปีที่แล้ว +92

    I DON'T SKIP ADS ONLY FOR HARRY'S HARDWORK

  • @AbhishekMishra-fn5bq
    @AbhishekMishra-fn5bq 3 ปีที่แล้ว +11

    Very simple and clear explanation of Selection Sorting, Big Thanks. Please finish this course.

  • @webseriesworld1791
    @webseriesworld1791 3 ปีที่แล้ว +21

    19:14
    As per swaps -> Selection sort is adaptive
    because if the array is sorted then we have to do less swaps
    but As per comparisons -> Selection sort is not adaptive
    because even in Best Case we have to do all the comparisons
    Thnx harry bhai for all this !!!!!

  • @samirrobin3524
    @samirrobin3524 2 ปีที่แล้ว +11

    Sir's way of explaining is truly amazing!
    It makes the complex topic also too easy for us to understand...Thank you very much Sir..❤️❤️🥰🥰

  • @prathamrajgor
    @prathamrajgor 2 ปีที่แล้ว +2

    Tried Writing code Just After explanation and it Works perfectly fine
    void SelectionSort(int *arr, int n){
    int temp;
    for (int i = 0; i < n - 1 ; i++)
    {
    for (int j = i+1; j < n ; j++)
    {
    if(arr[ i ] > arr[ j ]){
    temp=arr[ i ];
    arr[ i ]=arr[ j ];
    arr[ j ]=temp;
    }
    }
    }
    }

  • @saharajaman894
    @saharajaman894 3 ปีที่แล้ว +6

    My favourite tutor. I always follow this channel and learn java basically. ❣️❣️

  • @blackwolfkills
    @blackwolfkills 3 ปีที่แล้ว +4

    Plzzz don't stop making these videos as they are really great........plzz

  • @abhisheksah99
    @abhisheksah99 9 หลายเดือนก่อน +2

    i listened only for first 5 min and was able to code the selection sort thank you sir

  • @rvpandey-k4v
    @rvpandey-k4v 8 หลายเดือนก่อน +1

    we are very thankfull to get these kind of person who are trying to support those people who can not able to afford expensive courses for this subjects but still we are not supporting these people . i am the biggest fan of @codewithharry sir keep it doing we always try to support you but instead of being supporting some people abuse these people iit is kind of very thoughtfull think how they are living on our mother earth.

  • @PGiri2002
    @PGiri2002 2 ปีที่แล้ว +3

    Time - 2:34
    void selectionSort(int *arr, int length)
    {
    int temp,elm;
    for (int i = 0; i < length-1; i++)
    {
    elm=arr[i];
    for (int j = i; j < length; j++)
    {
    if (elm>arr[j])
    {
    temp=arr[i];
    arr[i]=arr[j];
    arr[j]=temp;
    }
    }
    }
    }

  • @gulshan2052
    @gulshan2052 3 ปีที่แล้ว +7

    Harry sir, you are awesome. You do so much of hard work for us.

  • @oyepuru
    @oyepuru 3 ปีที่แล้ว +15

    Next Roadmap Competitive Programing Brother
    Like For Better Reach Everyone

  • @technicalnitians8968
    @technicalnitians8968 3 ปีที่แล้ว +11

    Bro Trees and Graphs topic is left
    That's the important one topic to cover in this DSA

  • @rupamsud718
    @rupamsud718 3 ปีที่แล้ว +2

    Chahe abhi nahi dekho gaa lekin jaab time aayega tu jarror dekho ga aur samjho gaa kyuki abhi mujhe patah nahi hain ki yai kyaa hain. Your videos are like that I can even watch them after 100 years

  • @shaikhmukhtar5748
    @shaikhmukhtar5748 ปีที่แล้ว +3

    I'm learning DSA with superb entertainment ❤️

  • @durgawatisingh8350
    @durgawatisingh8350 2 หลายเดือนก่อน

    Very simple clear explanation all clear understanding 👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌💯💯💯💯

  • @DipsOfficial802
    @DipsOfficial802 ปีที่แล้ว +2

    Thank you harry bhai for such a great course 🙏🙏🙏

  • @atulwadhwa192
    @atulwadhwa192 3 ปีที่แล้ว +3

    @CodeWithHarry , by default its non adaptive but cant we make it adaptive??

  • @ChetanBhole
    @ChetanBhole 3 ปีที่แล้ว +2

    Mujhe Pata Nii Tha Apne DSA Ka Course Start Kr Diye Just Abhi Maine Playlist Access Ki.

  • @rupakdutta5577
    @rupakdutta5577 3 ปีที่แล้ว +5

    5 months ago u promised this:"Very few people have followed the playlist till here. But dont worry chahe 100 views aaye ya 1 view aaye course poora khatam karunga!"
    Kaha gye wo promise ? Tbh,not one ever explained DS the way u did.

  • @Ajinkya_Chirde_07
    @Ajinkya_Chirde_07 ปีที่แล้ว +1

    best explanation Harry bhai👍

  • @adityakumar6945
    @adityakumar6945 2 ปีที่แล้ว

    Thanks a lot ! I am a beginner ...started coding a month back. Really scatched my head over this one......

  • @mfcd7-
    @mfcd7- 3 ปีที่แล้ว +2

    Thanks Harry bhai you are doing great work for us❤️❤️

  • @engineerbhai7642
    @engineerbhai7642 3 ปีที่แล้ว +2

    You deserve millions subscribers.

  • @nageshsalgude3572
    @nageshsalgude3572 2 ปีที่แล้ว +1

    thank you Harry bhai for making such useful content

  • @user-wh2lr6sk3r
    @user-wh2lr6sk3r ปีที่แล้ว

    Harry Bhaiya you are the best teacher for CS students Love You

  • @EngineersKatta004
    @EngineersKatta004 2 ปีที่แล้ว

    My college is not serious about DSA,I think they are also watch your videos and teaches to us,But harry bhai aap jo mehenat kar rhe ho hamare liye usko 21 tofo ki salami

  • @anexocelisia9377
    @anexocelisia9377 2 ปีที่แล้ว +7

    Selection Sort
    Take a pointer at the start of the array and traverse the array and find the min element and swap. Then simply increase the pointer and do this till last element of the array.
    No, it is not adaptive as it will do comparisons for swapping even when the array is already sorted.

  • @aayushibahukhandi
    @aayushibahukhandi 3 ปีที่แล้ว +1

    You are awesome!!! 🥳

  • @udaykirankavaturu6942
    @udaykirankavaturu6942 11 หลายเดือนก่อน

    Harry bhaiya done with this thank you 24:37

  • @ankurdahiya3611
    @ankurdahiya3611 2 ปีที่แล้ว +4

    i didn't understand why Selection Sort is not (Adaptive)?
    because as you said in last videos an algorithm is Adaptive if our efforts are minimized if an array is sorted........here if array is sorted we didn't have to swap elements...so effort is minimized should it not be Adaptive?

  • @aku_11_11
    @aku_11_11 3 ปีที่แล้ว +1

    ❤️❤️ Harry bhai u r my life..💜💜 "Placement". kee liye bhi kuch tips bata do plz Harry bhai.!!!!!

  • @sudarshanmhaisdhune1039
    @sudarshanmhaisdhune1039 2 ปีที่แล้ว +2

    Wow! Such a learning 💗

  • @AbdulRahman-tj3wc
    @AbdulRahman-tj3wc 2 ปีที่แล้ว +3

    Why Selection Sort is not Adaptive if number of swaps is zero in sorted arrays???

  • @VijayKumar-go6cr
    @VijayKumar-go6cr 3 ปีที่แล้ว +38

    Who is following him from last year?🤗🤗

  • @Karthik-kt24
    @Karthik-kt24 3 ปีที่แล้ว +3

    Very helpful channel! goldmine for students! may god bless u 🙇‍♂️🙏

  • @aaishuagarwal6629
    @aaishuagarwal6629 2 ปีที่แล้ว +1

    Please complete the series as soon as possible

  • @MrSaint-ch6xn
    @MrSaint-ch6xn 3 ปีที่แล้ว +7

    18:20 selection sort is not adaptive

  • @Forever._.curious..
    @Forever._.curious.. 2 ปีที่แล้ว +1

    Masttt jaa ra he 🤩🙌🏻

  • @myselfarav3024
    @myselfarav3024 3 ปีที่แล้ว +5

    Harry sir, you are just amazing. You deserve much more subscribers and viewers and likers and commenters...

  • @knirmandeb
    @knirmandeb 3 ปีที่แล้ว +1

    Love your teaching styles bro

  • @rishabhshukla2523
    @rishabhshukla2523 3 ปีที่แล้ว +1

    Bhai plzz continue ds lecture

  • @RahmatKhanZai89
    @RahmatKhanZai89 2 ปีที่แล้ว

    वास्तव में अद्भुत सामग्री

  • @TwinshuParmar
    @TwinshuParmar 3 ปีที่แล้ว

    Thanks Harry Bhaiya...
    Stay Blessed

  • @studynewthings1727
    @studynewthings1727 ปีที่แล้ว

    Thankyou man to simplify concepts with perfect examples

  • @than0s869
    @than0s869 2 ปีที่แล้ว +1

    Great Explanation Ever 🤠

  • @IT__HarshVaish
    @IT__HarshVaish 2 ปีที่แล้ว

    Very simple language.

  • @anshdholakia714
    @anshdholakia714 3 ปีที่แล้ว +1

    19:23 not adaptive, because the algorithm will compare the numbers even if the array given is sorted

  • @shalinisharma3777
    @shalinisharma3777 2 ปีที่แล้ว

    @codewithharry
    Harry Bhai
    A very huge thanks to you ❣️🌸✌️

  • @ShaksD-vf3go
    @ShaksD-vf3go หลายเดือนก่อน

    Goat=harry bhai❤❤

  • @royfamily9273
    @royfamily9273 2 ปีที่แล้ว

    Thanks Harry Bhaiya

  • @phnix5661
    @phnix5661 3 ปีที่แล้ว +1

    harry sirji will you provide the notes for these videos or we should start taking notes

  • @abhishekganapure6456
    @abhishekganapure6456 3 ปีที่แล้ว

    Kardi adla badli harry bhai khub maza aaya

  • @ridham7120
    @ridham7120 3 ปีที่แล้ว

    Codewithharry is the best

  • @yatinarora1252
    @yatinarora1252 3 ปีที่แล้ว

    Never been this early...thanku so much for ur precious time

  • @asishkumarsingh9276
    @asishkumarsingh9276 2 ปีที่แล้ว

    Harry bhai course bahot hi acha hai

  • @yasharyan9814
    @yasharyan9814 ปีที่แล้ว

    bhaiya coding toh aapse hi samajh mein aati hai 👍

  • @hardikgamer1730
    @hardikgamer1730 5 หลายเดือนก่อน

    harry bhai konsa software use kr rhe ho ye explain krne ke liye

  • @NITISHKUMAR-vu8gy
    @NITISHKUMAR-vu8gy 3 ปีที่แล้ว

    app se achha teacher nhi hai koe

  • @Beginner..
    @Beginner.. 3 ปีที่แล้ว +1

    Heart de do naa Harry bhai
    Pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
    Waiting for you heart from last 2years!

  • @mujeeburrehman8145
    @mujeeburrehman8145 2 ปีที่แล้ว +1

    sir selection sort is not adaptive but we can make it adaptive like
    key = arr[0];
    min = arr[0];
    aftar one whole pas we check
    if (key == min)
    return;

    • @ankurdahiya3611
      @ankurdahiya3611 2 ปีที่แล้ว

      lmao it'll not work bro because consider if only 1st element is less than all other elements....then it'll return for example {0,25,34,1,2} it'll return if 1st element is lesser than others

  • @HarpreetKaur-wb2sk
    @HarpreetKaur-wb2sk 3 ปีที่แล้ว

    Excellent way of teaching

  • @subhrajyotidas2569
    @subhrajyotidas2569 3 ปีที่แล้ว

    treasure of ds

  • @sailendrachettri8521
    @sailendrachettri8521 3 ปีที่แล้ว +1

    Must hay bhai :)

  • @bug244
    @bug244 2 ปีที่แล้ว

    Thanku haary sir for your hard work

  • @vedantmule6237
    @vedantmule6237 2 ปีที่แล้ว

    Yes, I think it is adaptive ,
    Honestly.

  • @pankajkumarsingh3521
    @pankajkumarsingh3521 2 ปีที่แล้ว

    greatt coursee sirr

  • @ilovejs1768
    @ilovejs1768 3 ปีที่แล้ว

    gazab explanation harry bhai

  • @umeshchandra7441
    @umeshchandra7441 3 ปีที่แล้ว +1

    Sir plz make a course on game development with unity

  • @princesukhala7106
    @princesukhala7106 2 ปีที่แล้ว

    7:00min
    Done done

  • @Sub-sw4zd
    @Sub-sw4zd 3 ปีที่แล้ว +2

    First view
    Learning coding at age of 13

  • @ConfusedBeachHammock-tc8km
    @ConfusedBeachHammock-tc8km 4 หลายเดือนก่อน

    Thanks a lot

  • @ritikchoudhary9601
    @ritikchoudhary9601 3 ปีที่แล้ว +1

    OSSUM Video bhai
    i

  • @jawadbaba9153
    @jawadbaba9153 ปีที่แล้ว

    Well explained

  • @adarsharora6097
    @adarsharora6097 2 ปีที่แล้ว

    thanks harry bhai

  • @NavneetKaur-nc6vp
    @NavneetKaur-nc6vp ปีที่แล้ว

    Thanks

  • @meme_menaty
    @meme_menaty 3 ปีที่แล้ว +1

    harry bhi please make a video on java in 1 video
    this is very imp for us

  • @spicyedutainment1577
    @spicyedutainment1577 2 ปีที่แล้ว +1

    no the selection sort is not adaptive because we still comparison the elements in case of sorted array

  • @NITISHKUMAR-vu8gy
    @NITISHKUMAR-vu8gy 3 ปีที่แล้ว

    sir app k liye bas kya hi bplu lajawab

  • @AvinashPrajapati
    @AvinashPrajapati 2 ปีที่แล้ว

    Bhai hashing ke video upload karona!

  • @RohanDasRD
    @RohanDasRD 3 ปีที่แล้ว

    Best Explanation Bhai!

  • @manashalder3999
    @manashalder3999 3 ปีที่แล้ว

    Yes I understood this algorithm

  • @suhanikerkar
    @suhanikerkar ปีที่แล้ว

    Thanks understood well ;)

  • @pankajkumarsingh3521
    @pankajkumarsingh3521 2 ปีที่แล้ว

    u r greatt

  • @tinkurana9481
    @tinkurana9481 ปีที่แล้ว

    Mast kag raha dir mai pahle bar se ikh raha hun

  • @akshatvashishtha1
    @akshatvashishtha1 2 ปีที่แล้ว

    19:08 no not adaptive will do n-1 passes and n^2-n comparisons

  • @Sans_K5
    @Sans_K5 ปีที่แล้ว

    thanks_Sir💜⚡️

  • @MrSaint-ch6xn
    @MrSaint-ch6xn 3 ปีที่แล้ว

    A biggest thank you for you ❤️❤️❤️😘❤️❤️❤️❤️

  • @mohammadfaisal3649
    @mohammadfaisal3649 2 ปีที่แล้ว

    harry bhai sath mai code bhi karaya kro yar please ......overall your content is very good

  • @SahilSingh-oc1ps
    @SahilSingh-oc1ps 3 ปีที่แล้ว

    Bhaiya tree topic bhi details m pdha do...... And thanks a lot for all your playlists ❤️

  • @sohaibmughalmughal4680
    @sohaibmughalmughal4680 2 ปีที่แล้ว

    Great teacher

  • @blackwolfkills
    @blackwolfkills 3 ปีที่แล้ว

    Great explaination.....

  • @ritikjain6952
    @ritikjain6952 3 ปีที่แล้ว

    Harry bhai we also want to see videos on graphs and trees

  • @dipakkumarsingh9884
    @dipakkumarsingh9884 2 ปีที่แล้ว

    Respect 🙆🏼‍♂️💯

  • @suneelpandita3499
    @suneelpandita3499 3 ปีที่แล้ว +8

    Day 22 of commenting until Harry bhai makes a PyQt5 tutorial

    • @supernova4467
      @supernova4467 2 ปีที่แล้ว +1

      Nehi krega gund maralo

  • @Aspi12354
    @Aspi12354 3 ปีที่แล้ว

    Awesome Video👍👍

  • @sanketsuryawanshi
    @sanketsuryawanshi 3 ปีที่แล้ว

    Nice harry bhai thanks 🔥