Google interview question

A card game solved using recursion and brute force