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 &data, std::string query){

}

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!