Struggling to understand how to loop this properly how do i


Struggling to understand how to loop this properly. How do I set up the initial arrays with "minimum length 1" and then loop through it?

Given an array of ints, minimum length 1, figure out which is larger between the first and last elements in the array, and set all the other elements to be that value. Return the changed array.

public int[] maxEnd(int[] a) {

}

Solution Preview :

Prepared by a verified Expert
Business Management: Struggling to understand how to loop this properly how do i
Reference No:- TGS02779882

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)