AKUNA CAPITAL interview question

Markov chain, dynamic programming, combinatorics, very easy