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

 

pais@kinetigram.com arrays02 > A213_unlucky1
prev  |  next  |  chance

APCS Array 2, Problem 13. 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.


A213_unlucky1([1, 3, 4, 5]) → true
A213_unlucky1([2, 1, 3, 4, 5]) → true
A213_unlucky1([1, 1, 1]) → false

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

public boolean A213_unlucky1(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: 100

Copyright Nick Parlante 2017 - privacy