Your question is Same Characters Check. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
The Amex App receives text from multiple search or support-entry surfaces. Given two strings, determine whether they contain exactly the same characters with the same frequencies, regardless of character order.
Characters are case-sensitive, and spaces and punctuation count as characters. Return True when the strings are anagrams of one another, otherwise return False.
Implement same_characters(s, t):
s and t, each containing printable characters.True if both strings contain the same character counts, otherwise return False.def same_characters(s, t):