Pregunta de entrevista de IBM

Data Structures and Algorithm based question