Compute winning probability on 1D dice walk | Google Interview Question