about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 105
Copyright Nick Parlante 2017 - privacy