Datadog Interview Question

What is the complexity of my solution?