Selection Sort Code in Java | DSA

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2023
  • Check out our courses:
    Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
    Coupon: TELUSKO10 (10% Discount)
    Master Java Spring Development : bit.ly/java-spring-cloud
    For More Queries WhatsApp or Call on : +919008963671
    website : courses.telusko.com/
    Instagram : / navinreddyofficial
    Linkedin : / navinreddy20
    TELUSKO Android App : bit.ly/TeluskoApp
    Discord : / discord
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @Aditya-oi5xw
    @Aditya-oi5xw 9 หลายเดือนก่อน +1

    yeah. Please keep uploading more videos on DSA

  • @naveenalla3000
    @naveenalla3000 9 หลายเดือนก่อน +1

    thank you sir. Could you make a video on explaining the design patterents and where they should be use
    in real world applications

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

    Make Videos on design patterns.

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

    Nice Explanation Sir
    --------------------------------------
    Another logic
    package Sorting;
    import java.util.Arrays;
    public class SelectionSort2 {
    public static void main(String[] args) {
    int[] arr = {6,9,1,2,3,0,12,4};
    //int[] arr = {6,5,2,8,9,4};
    int size = arr.length;
    int maxIndex = -1;
    System.out.println("Before Sorting : " +Arrays.toString(arr));

    int k=size;
    for(int i=0;i

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

    thank you sir

  • @RishiRajxtrim
    @RishiRajxtrim 9 หลายเดือนก่อน

    🙏

  • @user-zn8we9cw4u
    @user-zn8we9cw4u 8 หลายเดือนก่อน

    Swapping max with last position code
    private static int[] selectionSort(int[] arr) {
    int placeholder = 0;
    int max = 0;
    for(int i=arr.length-1;i>=0;i--){
    max = i;
    for(int temp=0;temparr[i])
    max = temp;
    }
    placeholder = arr[i];
    arr[i] = arr[max];
    arr[max] = placeholder;
    }
    return arr;
    }

  • @technoumar5992
    @technoumar5992 9 หลายเดือนก่อน +1

    2nd view❤❤

  • @propranith777
    @propranith777 9 หลายเดือนก่อน

    1st view

  • @akosisydney28
    @akosisydney28 23 วันที่ผ่านมา

    ow so basically it's a gold digger algorithm hahhahaa