Common Elements with Frequency — Coding problem | OneNoughtOne