about | help | code help+videos | done | prefs |
array_7rowOrSandwich
Given an integer array "a", return the number of times that two sevens appear in a row plus the number of seven sandwiches. An example of "two sevens in-a-row" would be {2,7,7,4}. An an example of a "seven sandwich" would be {1,7,2,7}. array_7rowOrSandwich([1, 2, 3, 7, 7]) → 1 array_7rowOrSandwich([3, 7, 2, 7, 7]) → 2 array_7rowOrSandwich([7, 2, 0, 8, 7]) → 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