Dataminr Interview Question

LeetCode style question with lots of edge cases.