Confidential Interview Question

Explain the time complexity of your solution.