Motorq interview question

A competitive programming question that mostly just used original thinking, not really DSA