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

 

dsawyer@methacton.org arrays_level_2 > fiveO
prev  |  next  |  chance

Returns false if there is a five without a zero immediately before or after it; otherwise returns true. The array length will always be three or more.


fiveO([5, 0, 4]) → true
fiveO([3, 5, 6]) → false
fiveO([3, 5, 5, 0]) → false

...Save, Compile, Run (ctrl-enter)

public boolean fiveO( int [] nums ){ }

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

Difficulty: 200

Copyright Nick Parlante 2017 - privacy