New Work SE Interview Question

1. Time complexity of the implemented algorithm.