id/email
password
forgot password
create account
 
Or use Mozilla Persona:

Nick's post on Why Persona is Great
about | help | code help+videos | done | prefs
CodingBat code practice

Java > Array-1 > unlucky1
prev  |  next  |  chance

We'll say that a 1 immediately followed by a 3 in an array is an "unlucky" 1. Return true if the given array contains an unlucky 1 in the first 2 or last 2 positions in the array.

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

...Save, Compile, Run


Show output only (no red/green)

prev  |  next  |  chance   |  CodingBat  >  Array-1

Forget It! -- delete my code for this problem

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

Code Help and Videos

Misc Code Practice

175.0

Copyright Nick Parlante 2006-11 - privacy