JPMorganChase Interview Question

Data structures and algorithms, Java