Datadog Interview Question

Binary tree question which was somewhat basic