Pocket Gems interview question

Find k most popular numbers in an array