Upstox Interview Question

Complete the take home assignment.