Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT arr = [ 1 , 2 , 2 , 6 , 6 , 6 , 6 , 7 , 10 ] NEW_LINE N = len ( arr ) NEW_LINE K = 4 NEW_LINE NDivKWithFreq ( arr , N , K ) NEW_LINE DEDENT