Question: Develop a method called FindDiff takes an array A of integers and returns the difference between the largest value and smallest value in the array.
Develop a method called FindDiff takes an array A of integers and returns the difference between the largest value and smallest value in the array. We are assuming the length 1. You do not need to write the method main. For instance, FindDiff([1, 3, 2, 6, 10]) rightarrow 9 FindDiff([1, 6, 4]) rightarrow 5 FindDiff([5]) rightarrow 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
