What
Declare Integer startScan
Declare Integer minindex
Declare Integer minValue
Declare Integer index
For startScan = 0 To arraySize - 2
Set minindex = startScan
Set minValue = array[startScan]
For index = startScan + 1 To arraySize - 1
If array[index] < minValue
Set minValue = array[index]
Set minindex = index
End If
End For
Call swap(array[minIndex], array[startScan])
End For
Learn your wayIncludes step-by-step video
Chapter 9 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Programming in C
Starting Out with C++: Early Objects (9th Edition)
Introduction To Programming Using Visual Basic (11th Edition)
C++ How to Program (10th Edition)
Using MIS (10th Edition)
Artificial Intelligence: A Modern Approach
- With number of array elements, a desired element will be searched in the string, and if it is found, its index will be returned, and if not found, the value -1 will be returned. (Use Pointer )arrow_forwardSorted Names Problem:Assume that you already have the bubbleSort () ans swapS() modules. Design the main() program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents. // The bubbleSort module accepts an array of Strings and array size// and sorts array in ascending orderModule bubbleSort(String Ref array[], integer arraySize) Declare Integer index1, index2 // bubblesort scores For index1 = arraySize – 1 to 0 Step -1 For index2 = 0 to index1 – 1 If array[index2] > array[index2 + 1] Then Call swapS(array[index2], array[index2 + 1) End If End For End ForEnd Module// The swapS module accepts two String elements and swaps their contentsModule swapS(String ref a, String ref b) Declare String temp // Swap a and b Set temp = a Set a = b Set b = tempEnd Modulearrow_forwardtest_var = 'AAMMTTMT';//test_var is testing variable takenarray = test_var.split('');//string is split into the array function SWAP(TAM, i, j)//function to swap{temp = TAM[i];TAM[i] = TAM[j];TAM[j] = temp;}function sort_AMT(TAMUK)//function to sort the array{for(i = 0; i<TAMUK.length;i++){for(j = 0; j<TAMUK.length-1;j++){if(TAMUK[i]<TAMUK[j])SWAP(TAMUK,i,j);}}console.log(TAMUK);} sort_AMT(array);//function call How to write an HTML code for this javascript result/output? where the result will be displayed in HTML page.arrow_forward
- test_var = 'AAMMTTMT';//test_var is testing variable takenarray = test_var.split('');//string is split into the array function SWAP(TAM, i, j)//function to swap{temp = TAM[i];TAM[i] = TAM[j];TAM[j] = temp;}function sort_AMT(TAMUK)//function to sort the array{for(i = 0; i<TAMUK.length;i++){for(j = 0; j<TAMUK.length-1;j++){if(TAMUK[i]<TAMUK[j])SWAP(TAMUK,i,j);}}console.log(TAMUK);} sort_AMT(array);//function call Can I have this program output and code in HTML page?arrow_forwardJAVA CODE PLEASE Functions with 1D Arrays Practice I by CodeChum Admin Instruction: Write a program that has a function that accepts a character array and counts the number of vowel in character array. Output Number·of·vowels:·5arrow_forwardAn array is a collection of similar data elements stored at contiguous memory locations. It is the simplest data structure where each data element can be accessed directly by only using its index number. The following is an array of unsorted numbers called NumArr. NumArr: 24 56 78 79 34 75 2 23arrow_forward
- Search Benchmarks Design an application in pseudocode that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values. The module should keep a count of the number of comparisons it makes until it finds the value. Then the program should call another module that uses the binary search algorithm to locate the same value. It should also keep a count of the number of comparisons it makes. Display these values on the screen.arrow_forwardMIPS assembly language program Linear Search: Write a MIPS assembly language program that can search for a number that entered by user in an array with 20 integer numbers and prints the index of the number in the array if it is found.arrow_forwardArray TypesObjective: Based on the given values and initializations, give what is being required of each statement.1. Given A[10], α=2000, esize=4 bytes:a) Find the number of elements.b) Find the address of the 6th element.c) Find the index no. of the 8th element.2. Given E[3][4], α=2020, esize=4 bytes:a) Find the total no. of elements.b) Find the address of the last element.c) Find the address of the 10th element.arrow_forward
- TRUE or FALSE - A pointer can be used to access elements of an array. Select one: a.TRUE b.FALSEarrow_forwardJAVA CODE PLEASE Functions with 2D Arrays Quiz by CodeChum Admin Write a program that asks the user for the row and column size of a 2D array and asks the user for the elements. Write the total of the sum of each row multiplied with the row number. Example: 1 2 3 -> (1+2+3) * 1 = 6 4 5 6 -> (4+5+6) * 2 = 30 7 8 9 -> (7+8+9) * 3 = 72 total: 108 Input 1. One line containing an integer for the number of rows 2. One line containing an integer for the number of columns 3. Multiple lines containing an integer for every element of the array for each line Output Row·size:·3 Column·size:·3 R1C1:·1 R1C2:·2 R1C3:·3 R2C1:·4 R2C2:·5 R2C3:·6 R3C1:·7 R3C2:·8 R3C3:·9 1·2·3 4·5·6 7·8·9arrow_forwardQ1arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning