approach:
1:- made a hashTable of element,freq
2:-pushed element,freq pair from HT in a new priority_queue ( max heap for freq (p.second) ) for every iteration
3:- popped till k or while not pq empty and printed them
approach:
1:- made a hashTable of element,freq
2:-pushed element,freq pair from HT in a new priority_queue ( max heap for freq (p.second) ) for every iteration
3:- popped till k or while not pq empty and printed them