G-Research Interview Question

My interview round was based on coding puzzles. The exact question content is under NDA.