Mr. Handyman Interview Question

Dsa question and leetcode medium and hard