Python - Maximum N repeated Elements
Given a List of elements, we need to remove an element if it's occurrence in the list increases more than N. For example,Input : a = [6, 4, 6, 3, 6], N = 1Output : [6, 4, 3]Explanation : The occurrence 2nd onwards of 6 are removed.Input : a = [6, 4, 6, 3, 6], N = 2Output : [6, 4, 6, 3]Explanation :