+ 1
My code has a bug.
I’m trying To fix the sorting https://code.sololearn.com/c2kBw11ORVJF/?ref=app
1 Respuesta
+ 2
In your loops use this, otherwise you get out of range:
for(int i=0; i< li.Count -1; i++)
{
for(int j = 0; j<li.Count -1; j++)
and:
temp =li[j]; // it should be li[j]
li[j]=li[j+1];
li[j+1]=temp;