Humi interview question

Coding was a bit challenging, technical design