JPMorganChase interview question

Data structures and algorithms, Java