Thomson Reuters Interview Question

Find big Oh of code