Sonatus interview question

Standard medium level leetcode with log parsing