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

 

justIncreasing


Write a method that accepts an integer value to ignore and an array of integers. The method returns true if the array of integers is strictly increasing with the possible exception of the ignored value. Return false otherwise. For example justIncreasing(5, {3, 7, 5, 8, 20, 22, 5, 27}) returns true because if you ignore the 5's, the rest of the numbers in the array are strictly increasing. The array will contain at least one integer.


justIncreasing(5, [6, 5, 4, 3, 2]) → false
justIncreasing(12, [6, 5, 8, 9]) → false
justIncreasing(12, [6, 7, 12, 11]) → true

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

public boolean justIncreasing(int ignore, 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: 420

Copyright Nick Parlante 2017 - privacy