Why is it int j = i and not int j = i + 1 like that :

`for (int j = i + 1; j < array.length; j++)`

I ran the program with int j = i + 1, and it works, but I don't understand why it also works with int j = i (because we would compare the same element in the array? array[0] with array[0] instead of array[0] with array[i] if we add a +1.
Thanks,
acorrect solution doesn't mean it isthe ultimatecorrect solution, it is only just a solution. In this task the downloaded solution uses a selection sort algorithm which is one of the easiest to understand. You may have reached a different solution, maybe a bubble sort algorithm which a lot of new learners intuit on their own. I think, for small data sets such as this task, that either of these two algorithms would be the most efficient in terms of keeping the code brief, though a comparison sort would probably beat it out in terms of processing speed. When I first started on codegym, back in 2018, they didn't have the feature to download a solution. I believe, when they implemented it, that they just took passing code that students have previously submitted and used that as the code you can download when you want a correct solution. This code isn't optimized, as you have noticed, and is just 1 of potentially millions of different ways to solve a task.