We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Depending on the input string, you might not even need to test every 2-letter combination -- you can get the frequencies of all letters on the first pass through the string, then not bother testing (a, b) if their counts are off by more than 1, or if they would add up to less than some candidate solution you already found.
Two Characters
You are viewing a single comment's thread. Return to all comments →
Depending on the input string, you might not even need to test every 2-letter combination -- you can get the frequencies of all letters on the first pass through the string, then not bother testing (a, b) if their counts are off by more than 1, or if they would add up to less than some candidate solution you already found.