Pregunta de entrevista de Divami

Basic oops based question, data structure and algorithm