Infosys interview question

1. Top k frequency elements