C # program to find the smallest element with frequency exactly k .
using System ; using System . Linq ; using System . Collections . Generic ; class GFG { public static int smallestKFreq ( int [ ] a , int n , int k ) { Dictionary < int , int > m = new Dictionary < int , int > ( ) ;