G-Research Interview Question

Leetcode Easy in screening round