Pregunta de entrevista de Bloomberg

Q. Hackerrank question involving class objects.