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.
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.
//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
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
Thank you, man, need this for a test in Informatic tommorow.
Dziękuję za ten filmik. Pozdrowienia z Polski 😊
Welcome 🤗
you deserve more likes and subscribers. You're a life saver, thank you so much for this content.
Thanks for your appreciation.. share with your friends
This was really helpful as I am learning for the first time...thank you so much!!
Welcome 🙂
Please subscribe and share with your friends
bro very good explenation and technique
Thanks and welcome
Very clear. Thanks 🙏🏾
Welcome 🤗
Amazing Thank you
Welcome 😊
this is really helpful
Thanks 👍
You're doing a great job brw! Thank you 😌♥️
You are so welcome
Thank-you something.
Welcome
thank you sir😍
Welcome 😊
thanks
Welcome
Is this insertion sort or selection sort
This is simple sort
Watch this video to know selection and insertion sort algorithms
ruclips.net/video/QhtGiq2GBn0/видео.html
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.
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.
Number of sorting methods is there, can you please make video to compare all sorting methods
Can we use j=i in inner loop
But at the end will be an Indexoutofboundry exception for the j index
If you have a million numbers that would take for ever. How would you do it in that case?
//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
it would not take the computer forever.
@@officialyusra O(n^2) isn’t good enough in some cases. @alkrki510 has the best solution
thank you :)
welcome
where are you going .....pls reduce your speed
Thanks for your feedback. Will improve
Set your playback speed to 0.75 if it’s too fast for you to understand
I think its spelt as array not aarrae!bro
Index out of bound
I+1 does not exist
Check your indices
i needs to be smaller than array.length-1, because j=i+1, so fix for that is: for(i=0; i
Line no 13 14 15 bounce ho gya kucch samjh nahi aaya
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
@@programmingforbeginners7392 Got it Thank you soo much