about | help | code help+videos | done | prefs |
Given an array of integers, recursively compute the index of the first occurrence of that value in the array. If the value does not appear in the array, return -1. Note: You should solve this recursively (no loops). You will need a recursive helper method that takes an array and an index as parameters. first5([3, 7, 5]) → 2 first5([3, 7, 2, 11]) → -1 first5([5]) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300
Copyright Nick Parlante 2017 - privacy