Welcome to Westonci.ca, your one-stop destination for finding answers to all your questions. Join our expert community now! Experience the convenience of finding accurate answers to your questions from knowledgeable professionals on our platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
Explanation:
Since there are no line numbers in this question I will start counting from public class SelectionSort{ as line 1 and so on, as well as provide the code on that line.
The index of the smallest value is returned on line 8 where it says return min which shouldn't have any spaces and should be return minPosition;
The input array is given as an argument at the beginning of the function on line 2 where it says private static int positionMin (int] vals, int startPosition) {, as the variable vals.
This input array is also used as an argument on line 10 where it says Position; private static void swap(int] vals, int firstPosition, int secondPosition) and line 15 where it says vals[secondPosition] temp return public static void selSort(int| vals) {
Thanks for using our service. We're always here to provide accurate and up-to-date answers to all your queries. Thank you for your visit. We're dedicated to helping you find the information you need, whenever you need it. Thank you for trusting Westonci.ca. Don't forget to revisit us for more accurate and insightful answers.