PlanSource interview question

2 Coding problems on DSA