Question on Problem 27 - Sort with Indexes

Back to Problem Solutions forum

Daniel Nie     2021-09-01 14:17:10

Regarding this problem, it is the 2nd sort task after learning bubblesort, and it asks us to return the initial index (position) of the value after sorting. Should we still be using bubble sort to sort the values, but also figure out a way to determine the initial index. Or is the indexing a new way to sort that we should be trying to figure out?

Rodion (admin)     2021-09-01 16:59:22
User avatar

Daniel, hi there! look at the example answer - it contains only indices. So you may use any sorting algorithm (even sort them manually) - as long as you provide correct answer.

it is the 2nd sort task after learning bubblesort

note that problems do not follow any special order - they are ordered either by how much people solved them, or by order I created them. Both do not follow any special strategy.

Please login and solve 5 problems to be able to post at forum