JPMorganChase Interview Question

Average coding question about sorting