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

 

srp4379@lausd.net > isIncreasing
prev  |  next  |  chance

boolean isIncreasing(nums): Given an array of integers, return true if the numbers are in increasing order as you traverse (enumerate through) the array. It's OK if two or more consecutive numbers are equal. However, return false if any two consecutive numbers are in decreasing order. RUBRIC: It is not enough to just solve the problem. Make sure you use PROPER INDENTATION. You MUST use CURLY BRACKETS for all loops and if/else statements. Also, the more EFFICIENT your solution, the higher your grade. If you have extraneous (superfluous / unnecessary) code, deductions will be taken.


isIncreasing([2, 3, 5, 6, 9, 10]) → true
isIncreasing([1, 2, 3, 4, 5, 4]) → false
isIncreasing([50, 49, 51, 52, 52]) → false

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

public 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: 10

Copyright Nick Parlante 2017 - privacy