Selection Sort | Time and Space | Data Structure and Algorithms in JAVA

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ม.ค. 2025

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

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

    Started revising sorting algorithms after 5 months...wasted 2 days from notes, but now revised all 6 algos in just 2 hours from Sir...Thanks Sir

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

    sir your explanation method is awesome, can you please make a video on how to find time and space complexity ?

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

    Done!

  • @hemantsingh-zo3iw
    @hemantsingh-zo3iw 4 ปีที่แล้ว +1

    Sir,You are awesome

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +10

      Thank you and so are you. We are both awesome together.

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

    Sir Time complexity ka playlist v upload krye sir

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

    Wow sir that was a great explanation! sir I think we could have add this optimisation ,
    if(mi != i)
    swap(arr,i,mi);
    it would have made the code much better

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Thankyou buddy!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      Yes, you are right but optimisation part will be covered in level-2 and level-3.

    • @josteins4501
      @josteins4501 4 ปีที่แล้ว

      @@Pepcoding sure sir thank you for rectifying my query

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

    Sir Sare questions ki time and space kera do

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

    using recursion
    import java.io.*;
    import java.util.*;
    public class Main {
    public static void selectionSort(int[] arr,int n) {
    if(n==arr.length-1){
    return;
    }
    //write your code here
    int min=n;
    for(int i=n+1;i