about | help | code help+videos | done | prefs |
array_nextTrue
Given a boolean array "arr" and an integer "index", return the next index that has a value of true in the array. If you reach the end of the array, wrap around to the start! array_nextTrue([true, true, true], 0) → 1 array_nextTrue([true, true, true], 1) → 2 array_nextTrue([true, true, true], 2) → 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
Copyright Nick Parlante 2017 - privacy