Compute optimal stopping in a die-rolling game | Capital One Interview Question