Clean Power Research interview question

The coding questions were Leetcode medium to hard.