K Most Common Elements - Coding problem | OneNoughtOne