Menu

(Solved) : 80 Pts Consider Following Pseudocode Algorithm Input Integer Array Assume Array Indices S Q44024879 . . .

In C++

(80 pts) Consider the following pseudocode of an algorithm: Input: An integer array A. // Assume that array indices start at

(80 pts) Consider the following pseudocode of an algorithm: Input: An integer array A. // Assume that array indices start at 1 Output: ? 0 1 0 0 0 n A.length if (n=2) output “Invalid input.” and exit value A[2] – A[1] cur Minmin(A[1], A[2]) fori 3 to n do if (A[i] – A[curMin]>value) value A[i] – A[curMin] if (A[i] <curMin) cur Min A[i] return value 0 1 0 6 10 What does the above algorithm output? Implement the algorithm and run your program on 5 different inputs to verify your answer. Show transcribed image text (80 pts) Consider the following pseudocode of an algorithm: Input: An integer array A. // Assume that array indices start at 1 Output: ? 0 1 0 0 0 n A.length if (n=2) output “Invalid input.” and exit value A[2] – A[1] cur Minmin(A[1], A[2]) fori 3 to n do if (A[i] – A[curMin]>value) value A[i] – A[curMin] if (A[i]

Expert Answer


Answer to (80 pts) Consider the following pseudocode of an algorithm: Input: An integer array A. // Assume that array indices star…

OR