Saturam interview question

2 coding problems using preferred language