Pregunta de entrevista de BlackRock

Java basics, Design question and a DP question