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

 

orion.a.smith@gmail.com apcsa-lists > apcsaListFindDiv3
prev  |  next  |  chance

Given an ArrayList of Integers, return the index of the first element whose value is divisible by 3. Return -1 if no elements of the list are divisible by 3.


apcsaListFindDiv3([2, 3, 4]) → 1
apcsaListFindDiv3([2, 4]) → -1
apcsaListFindDiv3([6, 1, 6]) → 0

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

public int apcsaListFindDiv3(ArrayList<Integer> lst) { }

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: 220

Copyright Nick Parlante 2017 - privacy