KGI Securities interview question

Birthday paradox, math and programming question