Computers and Technology

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]

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, ahmedeldyame
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
image
Computers and Technology, 24.06.2019 08:00, nataliamontirl4230
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
image
Computers and Technology, 24.06.2019 13:50, Estefaniamarilicolin
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
Answers: 1
image
Computers and Technology, 24.06.2019 17:30, bxbykay1
Looking at the electroscope, describe how you can cause the two leaves at the bottom to repel each other and stay that way
Answers: 3
Do you know the correct answer?
The following two algorithms are designed to find the minimum value in a list of integers. Create...

Questions in other subjects:

Konu
Mathematics, 17.03.2021 23:50
Konu
Computers and Technology, 17.03.2021 23:50
Konu
Biology, 17.03.2021 23:50