Zendesk interview question

Input parsing leetcode medium question