Upstox interview question

Complete the take home assignment.