What type of algorithm is the following code?
i = 0while i < len(myList) - 1: minIndex = i j = i + 1 while j < len(myList): if myList[j] < myList[minIndex]: minIndex = j j += 1 if minIndex != i: swap(myList, minIndex, i) i += 1
A. binary search
B. bubble sort
C. sequential search
D. selection sort
Answer: D
You might also like to view...
To define styles for pages other than the first, left, or right, you first must create a(n) ____________________ for those styles.
Fill in the blank(s) with the appropriate word(s).
A1 is an example of a(n) ________
A) active cell B) worksheet C) cell address D) range
Answer the following statements true (T) or false (F)
1. In an if... structure, the only possible outcomes are either: a block of statements are executed or nothing is executed. 2. A valid test condition could be (x = 10), assuming x is an integer variable. 3. The following test condition for an if... structure will be true if x = 2: ``` if(x < 5 && x > 10) ``` 4. The result of any test condition is always either true or false. 5. The following test condition will evaluate to true if x = 5: ``` if(x < 3 || x == 5) ```
The company database may be stored on a central database server and managed by a database administrator.
Answer the following statement true (T) or false (F)