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.
You don't need to try all possible pairs of letters. You can get the count for each character in linear time (scanning through the string), and it doesn't make sense to test in detail 2 letters whose counts differ by more than 1.
Two Characters
You are viewing a single comment's thread. Return to all comments →
You don't need to try all possible pairs of letters. You can get the count for each character in linear time (scanning through the string), and it doesn't make sense to test in detail 2 letters whose counts differ by more than 1.