LiveRamp interview question

The coding question is leetcode "top K words",