id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

sspiege3@schools.nyc.gov arraymaxmin > scoresMax
prev  |  next  |  chance

Given an array of scores, compute the max of the first half and the min of the second half. Then return whichever is larger. The second half begins at index length/2. The array length will be at least 2.


scoresMax([3, 4, 5, 9, 10, 67]) → 9
scoresMax([100, 5, 6, 4, 99, 101, 121]) → 100
scoresMax([2, 2, 4, 4]) → 4

...Save, Compile, Run (ctrl-enter)

public int scoresMax(int[] scores) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 201 Post-solution available

Copyright Nick Parlante 2017 - privacy