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

 

norm.krumpe@muohio.edu labweek11 > countRaises
prev  |  next  |  chance

Given an array of integers, how many integers are followed immediately by an integer that is larger? For example, in the array {2, 7, 1, 4, 9} three of the integers are followed by a larger integer: the 2 is followed by 7, the 1 is followed by 4, and the 4 is followed by 9. The array will contain at least one integer.


countRaises([2, 7, 1, 4, 9]) → 3
countRaises([1, 1, 5]) → 1
countRaises([3, 2, 1, 1]) → 0

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

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