Datadog Interview Question

not leetcode style more like concept implementation