id/email
password
forgot password
about | help | done | prefs | create account
JavaBat java practice problems

Array-2 > isEverywhere
prev  |  next  |  chance

We'll say that a value is "everywhere" in an array if for every pair of adjacent elements in the array, at least one of the pair is that value. Return true if the given value is everywhere in the array.

isEverywhere({1, 2, 1, 3}, 1) → true
isEverywhere({1, 2, 1, 3}, 2) → false
isEverywhere({1, 2, 1, 3, 4}, 1) → false

...Save, Compile, Run

See Also: Example Code Java help: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  JavaBat  >  Array-2

Forget It! -- delete my code for this problem 236.0

Copyright Nick Parlante 2006-09 - privacy