id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

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)

public int array_7rowOrSandwich(int[] a) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Copyright Nick Parlante 2017 - privacy