Interactive Brokers interview question

python coding question based on hashmap