80 Pts Consider Following Pseudocode Algorithm Input Integer Array Assume Array Indices S Q43907049
Im using java.

(80 pts) Consider the following pseudocode of an algorithm: Input: An integer array A. //Assume that array indices start at 1 Output:? i n OVOGU AWN 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[cur Min] if (A[i] <curMin) cur Min A[i] return value 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:? i n OVOGU AWN 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[cur Min] 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 start…
OR