about | help | code help+videos | done | prefs |
foundPair
Given an array of integers, recursively determine whether there are at least two adjacent numbers that are equal. Note: You should solve this recursively (no loops). You will need a recursive helper method that takes an array and an index as parameters. Advice: If there are at least two items to look at, just check the first two, and let recursion handle the rest. foundPair([5, 2, 2, 4]) → true foundPair([2, 5, 2]) → false foundPair([0, 0, 17, 2, 99]) → true ...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