Thomson Reuters Interview Question

leetcode medium with one of their software developers