Java Abstract Array Min Max
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Implement abstract class Arr.
Implement class Array that extends Arr.
abstract class Arr { int a[]; // array of integers int n; // size of array abstract int Min(); // Return minimum element in array abstract int Max(); // Return maximum element in array } class Array extends Arr { Array (int n) // Constructor int Min() // Return minimum element in array int Max() // Return maximum element in array }
Input
First line contains number n. Next line contains n integers in the range from 0 to 100.
Output
Print the sum of minimum and maximum element in array.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 52%