Adobe Interview Question

Algorithm complexity