GroundTruth Interview Question

Whiteboard coding. Explain algorithm time complexity