Day 14: Scope - HackerRank 30 days of code solution
Objective Today we're discussing scope. The absolute difference between two integers, and , is written as . The maximum absolute difference between two integers in a set of positive integers, , is the largest absolute difference between any two integers in . The Difference class is started for you in the editor. It has a private integer array ( ) for storing non-negative integers, and a public integer ( ) for storing the maximum absolute difference. Task Complete the Difference class by writing the following: A class constructor that takes an array of integers as a parameter and saves it to the instance variable. A computeDifference method that finds the maximum absolute difference between any numbers in and stores it in the instance variable. Input Format You are not responsible for reading any in...