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

 

jebbert@volusia.k12.fl.us > mar11_2016_APSLHL_incRuns
prev  |  next  |  chance

Write a method that returns the number of "increasing runs" of numbers in the array 'nums'. An increasing run is any group of numbers that are strictly increasing in size. Any time the current number is less than or equal to the previous number a new run is started. For example, {4,5,8,8,9,22,4,5,8} has four runs {4,5,8}, {8}, {8,9,22}, and {4,5,8}. Your method only returns HOW MANY increasing runs there are.


mar11_2016_APSLHL_incRuns([200, 100, 40, 20]) → 4
mar11_2016_APSLHL_incRuns([400, 404, 409, 415, 422]) → 1
mar11_2016_APSLHL_incRuns([1, 2, 3, 4, 5, 6, 7, 8]) → 1

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

public int mar11_2016_APSLHL_incRuns(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: 290

Copyright Nick Parlante 2017 - privacy