Home > Back-end >  JAVA selection sort, a great god under the guidance of the small white?
JAVA selection sort, a great god under the guidance of the small white?

Time:05-27

The first picture is, return the minimum subscript function, second picture is a complete picture, line 22 23 what to fill in the code, how to reference the first map function?

CodePudding user response:

Sort method does not need to add a for loop, you that minIndex method directly

CodePudding user response:

Didn't watch carefully, probably want to write a swap
Int k=arr [m].
Arr=arr [m] [I];
Arr [I]=k;

CodePudding user response:

Positive solution on the second floor. Methods one traversal, incoming parameters directly in the sort method.

CodePudding user response:

Has solved the thank you
  • Related