Traversing map and finding duplicate elements .
for e in hm : NEW_LINE INDENT x = hm [ e ] NEW_LINE if ( x > 1 ) : NEW_LINE INDENT temp5 = factorial ( x ) NEW_LINE f //= temp5 NEW_LINE DEDENT return f NEW_LINE DEDENT def nextPermutation ( temp ) : NEW_LINE