Gemini Solutions Interview Question

One puzzle and one coding question