Is it possible to get permutations for a String that has repeated characters?
问题 I am currently using the trotter dart package on flutter, however it is unable to generate all permutations of strings with repeated numbers. It works fine with 1234, but not with 2344. 回答1: (Disclaimer: I'm the author of trotter . Thanks for your interest in my library!) When dealing with a moderate number of items, we can simply create a mapping from a regular sequence of permutations of indices to respective items in an arbitrary list. In this case, the arbitrary list contains the items in