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

 

contains


Given an array, recursively determine whether the specified value appears in the array. Note: You should solve this recursively (no loops). You will need a recursive helper method that takes an array, a value, and an index as parameters.


contains([1, 2, 3], 1) → true
contains([5], 6) → false
contains([0, 7], 7) → true

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

boolean contains(int[] nums, int val) { }

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

Copyright Nick Parlante 2017 - privacy