PMMockr

QuestionsTechnical PMTop-Interview

Top k frequent elements

Top k frequent elements

Additional context: Given an array of n numbers and a positive integer K, find the K numbers that appear most frequently in the array. If there is a tie, any set of K numbers can be returned.

What this question tests

Practise this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.

Start a timed mock interview

Related Technical PM questions

All Technical PM questions · Product manager interview questions by skill area