Jump Trading interview question

basic algorithm and data structure