Question d’entretien chez Sunrun

Few algorithm questions from Leetcode website.