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

 

norm.krumpe@muohio.edu quiz13part1 > secondMax
prev  |  next  |  chance

Given an array of integers, with no duplicates, return the second-largest value in the array. The array will always contain at least two numbers.


secondMax([4, 7, 1]) → 4
secondMax([6, 4, 7, 1]) → 6
secondMax([7, 5]) → 5

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

int secondMax(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