Solution for problem 1E Chapter 3.1
List all the steps used by Algorithm I to find the maximum
Discrete Mathematics and Its Applications | 7th Edition
List all the steps used by Algorithm I to find the maximum of the list 1, 8, 12, 9. 11, 2, 14, 5, 10, 4.
Solution:Step 1In this problem we have to list all the steps used by algorithm 1 to find maximum of the list 1, 8, 12, 9. 11, 2, 14, 5, 10, 4.Using algorithm 1Steps would be 1. Work on first element of given array in variable max.2. Compare max with the next element of array3. If nest element is greater then max will be replaced by this number.4. Repeat steps 2 and third till end of the array is reached.
Chapter 3.1, Problem 1E is Solved
Enter your email below to unlock your verified solution to:
List all the steps used by Algorithm I to find the maximum