CRX Markets interview question

Math task, testing code review tasks