S&P Global interview question

Program for Dictionary