Coviam Interview Question

Remove duplicate from Array with k repetition