Java Program #17 - Sort an Array of Integers in ascending order

Поделиться
HTML-код
  • Опубликовано: 13 дек 2024

Комментарии • 46

  • @jakobloos9554
    @jakobloos9554 2 дня назад

    Thank you, man, need this for a test in Informatic tommorow.

  • @patrykz971
    @patrykz971 Год назад +7

    Dziękuję za ten filmik. Pozdrowienia z Polski 😊

  • @kimberlymahilum7800
    @kimberlymahilum7800 Год назад +3

    you deserve more likes and subscribers. You're a life saver, thank you so much for this content.

  • @riddhibanerjee131
    @riddhibanerjee131 Год назад +3

    This was really helpful as I am learning for the first time...thank you so much!!

  • @enesfuenfeins
    @enesfuenfeins Месяц назад +1

    bro very good explenation and technique

  • @ashensavinda99
    @ashensavinda99 2 месяца назад +1

    Very clear. Thanks 🙏🏾

  • @User_user1445
    @User_user1445 Год назад +2

    Amazing Thank you

  • @MohammadShafi194
    @MohammadShafi194 5 месяцев назад +1

    this is really helpful

  • @Madhuu11
    @Madhuu11 Год назад +1

    You're doing a great job brw! Thank you 😌♥️

  • @Madeeha-u1k
    @Madeeha-u1k 8 месяцев назад +1

    Thank-you something.

  • @thuppadalokanath5444
    @thuppadalokanath5444 10 месяцев назад +1

    thank you sir😍

  • @needmtuan
    @needmtuan 11 месяцев назад +1

    thanks

  • @SlushiGuy
    @SlushiGuy 9 месяцев назад +1

    Is this insertion sort or selection sort

    • @programmingforbeginners7392
      @programmingforbeginners7392  9 месяцев назад +1

      This is simple sort
      Watch this video to know selection and insertion sort algorithms
      ruclips.net/video/QhtGiq2GBn0/видео.html

  • @dunniade8934
    @dunniade8934 4 месяца назад +1

    You didn't put in your braces on the first for loop, so how possible didn't it show errors. And if you were not going to put braces, you could have still closed it with semicolon.. i am still wondering why there were no bugs in that code.

    • @programmingforbeginners7392
      @programmingforbeginners7392  4 месяца назад +4

      if you have only one line of code in for loop than curly braces are optional. Curly braces in for loop are required for multiple lines of code inside for loop
      hope this helps.

  • @kirtipawar8442
    @kirtipawar8442 Месяц назад

    Number of sorting methods is there, can you please make video to compare all sorting methods

  • @laxmanaraomalla9738
    @laxmanaraomalla9738 10 месяцев назад

    Can we use j=i in inner loop

  • @chaouchomar9052
    @chaouchomar9052 9 дней назад

    But at the end will be an Indexoutofboundry exception for the j index

  • @houmengwong-o3u
    @houmengwong-o3u 11 месяцев назад +2

    If you have a million numbers that would take for ever. How would you do it in that case?

    • @alkrki510
      @alkrki510 10 месяцев назад

      //There is a build in method
      //Just import array
      import java.util.Arrays;
      //And for example
      Int arrayName[]={8,2,6,7};
      Arrays.sort(arrayName);
      //The new array is
      {2,6,7,8}
      //then it is sorted

    • @officialyusra
      @officialyusra 10 месяцев назад

      it would not take the computer forever.

    • @daniela8375
      @daniela8375 9 месяцев назад

      ⁠@@officialyusra O(n^2) isn’t good enough in some cases. @alkrki510 has the best solution

  • @soulexesns9522
    @soulexesns9522 7 месяцев назад +1

    thank you :)

  • @vishnubj826
    @vishnubj826 Год назад +1

    where are you going .....pls reduce your speed

  • @shabarimazumder2598
    @shabarimazumder2598 Месяц назад +1

    I think its spelt as array not aarrae!bro

  • @arunkumartirumala2852
    @arunkumartirumala2852 8 месяцев назад

    Index out of bound
    I+1 does not exist

    • @programmingforbeginners7392
      @programmingforbeginners7392  6 месяцев назад

      Check your indices

    • @Voixy
      @Voixy 25 дней назад

      i needs to be smaller than array.length-1, because j=i+1, so fix for that is: for(i=0; i

  • @rdsoffice8257
    @rdsoffice8257 Год назад

    Line no 13 14 15 bounce ho gya kucch samjh nahi aaya

    • @programmingforbeginners7392
      @programmingforbeginners7392  Год назад +2

      x = 1
      y = 2
      Ye dono variables ki values Hume interchange karni hai.. to ye karenge:
      temp = x (temp me 1 store ho gaya)
      x = y (x me 2 store ho gaya)
      y = temp (ab y me 1 store ho gaya Jo humne x se liya tha)
      so now:
      x = 2
      y = 1
      Values interchange ho gayi..
      Bas yahi hai line 13, 14, 15 me..
      Practice Karo

    • @rdsoffice8257
      @rdsoffice8257 Год назад

      @@programmingforbeginners7392 Got it Thank you soo much