LiveRamp Interview Question

The coding question is leetcode "top K words",