Compute Optimal Die Re-roll Strategy | Capital One Interview Question