Recursive interview question

Take home assignment about ML