Ostrom interview question

Two leetcode hards and one leetcode easy