Prodapt Solutions Interview Question

Technical round I was asked to code