Pergunta de entrevista da empresa Bloomberg

Q. Hackerrank question involving class objects.