A method that uses recursion to search for a specific key