Pregunta de entrevista de Interactive Brokers

Java Questions were asked to solve