IBM interview question

most optimized random algorithms