Upstox interview question

Assignment and discussion over assignment