Datadog interview question

Leetcode style interview for final with 3 questions.