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

 

orion.a.smith@gmail.com apcsa-recursion > apcsaRecurAnyOddWithIndex
prev  |  next  |  chance

Given an ArrayList of integers and a starting index, determine recursively if any of the integers from startIndex onward is odd. In this version of the problem, do NOT mutate the ArrayList in your code. Precondition: in the initial call, startIndex will always have the value 0.


apcsaRecurAnyOddWithIndex([0, 1], 0) → true
apcsaRecurAnyOddWithIndex([0, 2, 3, 4], 0) → true
apcsaRecurAnyOddWithIndex([0, 2, 4], 0) → false

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

public boolean apcsaRecurAnyOddWithIndex(ArrayList<Integer> nums, int startIndex) { }

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

Copyright Nick Parlante 2017 - privacy