+ 2

SelectSort

import java.util.Scanner; public class SelectSort { public static void main(String[] args) { int[] intArray = new int[6]; Scanner scan = new Scanner(System.in); int[] n = scan.nextInt(); int i = 0; while (i < N) { //using an object of the Scanner class fill the intArray array } i = 0; while (i < N) { int j = 0; while (j < N) { //implementation of the algorithm: finding the minimum element j++; } //algorithm implementation: put the found minimum element at the beginning of the subarray i++; } i = 0; while (i < N) { System.out.print(intArray[i]); i++; } } }

16th Jul 2021, 6:51 AM
Best of Sport
Best of Sport - avatar
14 Answers
+ 1
thanks for such criticism. but this is not a full-fledged code, it is a code skeleton that needs to be added to make it work correctly!
16th Jul 2021, 10:44 AM
Best of Sport
Best of Sport - avatar
+ 1
Thank you sir. I accept your criticism and understand that it does not carry any malicious intent. you will forgive me if you were rude. Perhaps I didn’t put it that way. I was pleased to read your messages! What I threw off was just a skeleton of the code.
16th Jul 2021, 4:46 PM
Best of Sport
Best of Sport - avatar
16th Jul 2021, 4:51 PM
Best of Sport
Best of Sport - avatar
+ 1
Here is my solution
16th Jul 2021, 4:52 PM
Best of Sport
Best of Sport - avatar
0
removed comments
16th Jul 2021, 7:20 AM
Best of Sport
Best of Sport - avatar
0
no, the code doesn't work. you need to create a sorted array, and then sort it in ascending order.
16th Jul 2021, 7:34 AM
Best of Sport
Best of Sport - avatar
0
selection sort
16th Jul 2021, 10:46 AM
Best of Sport
Best of Sport - avatar
0
I dont no itt
17th Jul 2021, 7:11 PM
Nelly frako
Nelly frako - avatar
0
How to upload your code?
18th Jul 2021, 5:41 AM
PALLAV ADHIKARI
PALLAV ADHIKARI - avatar