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

 

jgreenawalt@ccboe.com initials > bestTest
prev  |  next  |  chance

Given an array of test scores saved as ints, return the location (test number) of the highest score. If more than one score ties for the highest, return the location of the first test with the highest score. If the array is empty return -1.


bestTest([81, 72, 83, 74]) → 2
bestTest([94, 93, 92, 91]) → 0
bestTest([79, 98]) → 1

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

public int bestTest(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: 200

Copyright Nick Parlante 2017 - privacy