about | help | code help+videos | done | prefs |
Given an int array of any length, if there is a 2 in the array immediately followed by a 3, set the 3 element to 0. Return the changed array. Solve this problem using recursion! I suggest making a helper method so you can pass in additional parameters if needed. You MUST have a recursive solution. recursiveFix23([2, 3, 5, 6, 3, 8, 2, 1, 2, 3, 9, 10, 3, 2]) → [2, 0, 5, 6, 3, 8, 2, 1, 2, 0, 9, 10, 3, 2] recursiveFix23([2, 3, 3, 3, 3, 2, 2, 3]) → [2, 0, 3, 3, 3, 2, 2, 0] recursiveFix23([735, 2341, 324, 346, 412, 3, 3, 3, 896, 5, 67, 3, 2, 6, 7, 2, 3, 5, 1]) → [735, 2341, 324, 346, 412, 3, 3, 3, 896, 5, 67, 3, 2, 6, 7, 2, 0, 5, 1] ...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: 310
Copyright Nick Parlante 2017 - privacy