QUESTION 7 What is the dominant operation in this algorithm? 1. Input the number of values n 2. Input the list of numbers x1, X2, ..., Xn 3. min x1 4. For i = 2 to n do 4.1. If x; < min then 4.1.1. min + Xj 5. Output min a. Assignment in step 3. b. Assignment in step 4.1.1. c. Output answer. d. Comparison in step 4.1.

Algebra: Structure And Method, Book 1
(REV)00th Edition
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Chapter4: Polynomials
Section4.1: Exponents
Problem 1CE
icon
Related questions
Question
QUESTION7
What is the dominant operation in this algorithm?
1. Input the number of values n
2. Input the list of numbers x1, X2, ..., Xn
3. mine x1
4. For i = 2 to n do
4.1. If x; < min then
4.1.1. min e Xj
%3D
5. Output min
a. Assignment in step 3.
b. Assignment in step 4.1.1.
c. Output answer.
d. Comparison in step 4.1.
Transcribed Image Text:QUESTION7 What is the dominant operation in this algorithm? 1. Input the number of values n 2. Input the list of numbers x1, X2, ..., Xn 3. mine x1 4. For i = 2 to n do 4.1. If x; < min then 4.1.1. min e Xj %3D 5. Output min a. Assignment in step 3. b. Assignment in step 4.1.1. c. Output answer. d. Comparison in step 4.1.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell