Cornerstone OnDemand Interview Question

Just a basic algorithm question which took into consideration BigO notation.