#include <iostream>
#include <vector>
using namespace std;

int searchHelper(const int arr[], int start, int stop, int key)
{
	if(start == stop)	return -1;
	if(arr[start] == key) return start;
	return searchHelper(arr, start + 1, stop, key);
}

int search(const int arr[], int size, int key)
{
	return searchHelper(arr, 0, size, key);
}

int search(vector<int> const& vec, int key)
{
	return searchHelper(vec.data(), 0, (int)vec.size(), key);
}

int main() {
	int arr[] = {3,10,2,5,6,1};

	cout << search(arr, 6, 10) << endl;
	cout << search(arr, 6, 20) << endl;
	
	return 0;
}