Compute drawdown, profit, and coin change | Squarepoint Capital Interview Question