Pergunta de entrevista da empresa Sunrun

Few algorithm questions from Leetcode website.