about | help | code help+videos | done | prefs |
countRaises
Given an array of integers, how many integers are followed immediately by an integer that is larger? For example, in the array {2, 7, 1, 4, 9} three of the integers are followed by a larger integer: the 2 is followed by 7, the 1 is followed by 4, and the 4 is followed by 9. The array will contain at least one integer. countRaises([2, 7, 1, 4, 9]) → 3 countRaises([1, 1, 5]) → 1 countRaises([3, 2, 1, 1]) → 0 ...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: 200
Copyright Nick Parlante 2017 - privacy