Not Able To Solve Leetcode Interview