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

 

norm.krumpe@muohio.edu > isIncreasing
prev  |  next  |  chance

Determine recursively (no loops) whether the integers in an array are increasing. That is, return true if each element is smaller than the next element. Note: You should solve this recursively (no loops). You will need a recursive helper method that takes an array and an index as parameters. ADVICE: If there are fewer than 2 items to look at, then by default we would say those items are increasing. But if there are two or more items to look at, then just check if the first two are increasing, and let recursion handle the rest.


isIncreasing([1, 2, 3]) → true
isIncreasing([1, 2, 2]) → false
isIncreasing([3, 2, 1]) → false

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

boolean isIncreasing(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: 300

Copyright Nick Parlante 2017 - privacy