Permutations II
The code is the same as Permutations: the AvailableBox already holds one place per distinct value with its count (freq). A call loops over the values, not the numbers, so two equal numbers never start two branches and no permutation repeats; a value whose copies are all in currList is skipped (elementAvailable is false). In the box, the places its copies left stay dashed until they come back. In the tree a box shows the list a call starts from, and every leaf adds one permutation.