subject

The following two algorithms are designed to find the minimum value in a list of integers. Create a variable min, and set this to the first value in the list. Compare each
Algorithm subsequent value in the list against the value of min, and if it is smaller than
1: or equal to the current value, set min to this value. When the end of the list
is reached, display the value of min
Create a variable min , and set this to 0. Compare each value in the list
Algorithm
against the value of min, and if it is smaller than the current value, set min to
11:
this value. When the end of the list is reached, display the value of min.
Which of the following statements correctly demonstrates that the two algorithms are
NOT equivalent?
Neither algorithm will correctly display the minimum value of the list [0, 5, 6, 2]
Algorithm I will correctly display the minimum value of the list [4, 10, 6, 1],but Algorithm II
will not
Algorithm Il will correctly display the minimum value of the list (-4, 2, 3, 2) but Algorithm
will not
Both algorithms will correctly display the minimum value of the list [-1, 3, -4, 8]

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 08:10, anthonysutton82
Where are american poets found in the dewey decimal system
Answers: 1
image
Computers and Technology, 24.06.2019 20:00, diangeloortiz
Which element will you include to present numerical on a slide? a: graph b: text c: flowchart d: shapes
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, brandiewilliams12567
Astrategy for speeding up hard drive performance is
Answers: 2
image
Computers and Technology, 25.06.2019 15:30, keilahkimbrough8
What is the function of a computer screen?
Answers: 1
You know the right answer?
The following two algorithms are designed to find the minimum value in a list of integers. Create...

Questions in other subjects:

Konu
History, 30.08.2019 12:50