Thomson Reuters interview question

Coding round was there basically