Millennium interview question

I was asked probability and coding question