subject

The following method is a Selection Sort method. Within the method, there is an error on one line. Your job is to find that line and fix that one error so that the method may work properly. You will need to understand exactly how a selection sort method works.
Examples:
selectionSort ({4,7,1} ->{1,4,7}
selectionSort ({80,6,6,8,2} >2,6,6,8,80 1

1 public int[] selectionSort(int [] array) {
2 for (int i 0; i < array . length 1; i++) {
3 int min = array[i];
4 int minIndex i;
5 for (int j = i + 1; j < array. length; j++) {
6 if (min > array [j];
7 minIndex = j;
8 }
9 if (minIndex == i) {
10 array [minIndex] = array [i];
11 array [i] = min;
12 }
13 }
14 return array;
15 }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
Write a function 'music_func' that takes 3 parameters -- music type, music group, vocalist -- and prints them all out as shown in the example below. in case no input is provided by the user, the function should assume these values for the parameters: "classic rock", "the beatles", "freddie mercury". for example: input: alternative rock,pearl jam,chris cornell output: the best kind of music is alternative rock the best music group is pearl jam the best lead vocalist is chris cornell note: the print statements will go inside the for example: print("the best kind of music is"
Answers: 2
question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
You know the right answer?
The following method is a Selection Sort method. Within the method, there is an error on one line. Y...
Questions
question
Mathematics, 25.07.2019 16:30