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

 

isGrowing


Given an array of integers, return true if each element in the array is exactly one greater than the previous element, and return false otherwise. Arrays will always contain at least two elements.


isGrowing([7, 8, 9]) → true
isGrowing([4, 5, 6, 7]) → true
isGrowing([3, 3, 4, 5]) → false

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

boolean isGrowing(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