Dataminr interview question

Solve the Leetcode problem watched by an interviewer?