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

 

simona1@sfusd.edu > has88
prev  |  next  |  chance

Given an array of ints, return true if the array contains two 8's next to each other, or there are two 8's separated by one or two elements, such as with {8, 1, 8} or {8, 1, 1, 8}.


has88([1, 8, 8]) → true
has88([1, 8, 1, 8]) → true
has88([1, 8, 1, 1, 1, 8]) → false

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

public boolean has88(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

Post-solution available

Copyright Nick Parlante 2017 - privacy