Datadog Interview Question

2nd phase are 2 leet code style challenges