Talk:Permutations with some identical elements: Difference between revisions

Content added Content deleted
No edit summary
Line 28: Line 28:


== Close to the permutations task ==
== Close to the permutations task ==
Note that one of the simplest algorithms to generate permutations ([[Permutations#Iterative_implementation|this one]], which also appears in Knuth's TAOCP), can be trivially modified to handle this task: just replace < and > with <= and >=.
Note that one of the simplest algorithms to generate permutations ([[Permutations#Iterative_implementation|this one]], which also appears in Knuth's TAOCP), can be trivially modified to handle this task: just replace < and > with <= and >= in <code>nextperm</code>.


[[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 06:12, 10 February 2020 (UTC)
[[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 06:12, 10 February 2020 (UTC)