IBM interview question

Medium to Hard - Data Structures and Algorithm Questions