J.P. Morgan Interview Question

Quant puzzles, Sorting based questions