Young Coders: Week 4 Problems
The Final Challenges!
1) Create a method called between. Its parameter is an int array. It will return the maximum distance between any two equal values.
between(new int[] {1,0,4,2,5,0,0,5})
should return 6, because the leftmost 0 and the rightmost 0 are 6 elements apart (including themselves).
2) Create a method called checkIncrease. Its parameter is an int array. Return true if the ints are strictly increasing.
{1,1,1,4,5} --> false
{4,4,6,2,6,2,6,22} --> {4,6,2,22}