JPMorganChase interview question

Probability and Sorting algorithms, Puzzles