IBM Interview Question

Algorithm + Data structures