about | help | code help+videos | done | prefs |
Determine recursively (no loops) whether the integers in an array are increasing. That is, return true if each element is smaller than the next element. Note: You should solve this recursively (no loops). You will need a recursive helper method that takes an array and an index as parameters. ADVICE: If there are fewer than 2 items to look at, then by default we would say those items are increasing. But if there are two or more items to look at, then just check if the first two are increasing, and let recursion handle the rest. isIncreasing([1, 2, 3]) → true isIncreasing([1, 2, 2]) → false isIncreasing([3, 2, 1]) → false ...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: 300
Copyright Nick Parlante 2017 - privacy