Datadog Interview Question

Write a python function that count frequency bucket