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

 

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

Given an array of ints, return the location of the maximum value. If duplicates of the maximum value exist return the location of the first maximum. If the array is empty return -1.


wheresMax([2, 4, 7, 9]) → 3
wheresMax([]) → -1
wheresMax([-2, 3, 3, 4]) → 3

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

public int wheresMax(int [] nums){ }

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