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

 

srp4379@lausd.net quiz > inOrderDescending4
prev  |  next  |  chance

boolean inOrderDescending4(int[] nums). Given an array of ints with 4 elements, return true if they are in CONSECUTIVE, DESCENDING order. That means that each element is 1 less than the element preceding it. For example, {4,3,2,1} returns true. {4,3,2,0} returns false because the 4th element should be a 1, not a 0.


inOrderDescending4([4, 3, 2, 1]) → true
inOrderDescending4([4, 3, 2, 0]) → false
inOrderDescending4([14, 13, 12, 11]) → true

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

boolean inOrderDescending4(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: 105

Copyright Nick Parlante 2017 - privacy