Google Cloud Interview Question

top-k elements and longest repeating substring