Algorithm for finding string permutations where each position varies
Let's say I have a three character string "ABC". I want to generate all
permutations of that string where a single letter can be replaced with his
lower-case equivalent. For example, "aBC", "abC", "abc", "AbC", "Abc",
etc.
I've found algorithms to permute ABC where the letters themselves move,
e.g., "ABC", "BAC", "CAB", "CBA", "BCA", but not the problem I'm looking
at.
Thanks in advance.
No comments:
Post a Comment