Question: I'm working on a C++ program which asks to find the element in the vector that matches the user input using RECURSION, and returns the
I'm working on a C++ program which asks to find the element in the vector that matches the user input using RECURSION, and returns the position of that matched element.
Here is the fixed function type that we have to use for recursion:
int searchRecursive(std::vector
}
I just don't know how to do recursion without a count variable which increment or decrement for the recursion to work.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
