The Redistribute Characters to Make All Strings Equal problem asks whether you can redistribute characters freely among all strings to make every string identical. The answer is yes if and only if the frequency of every character in the combined pool is divisible by the number of strings. This easy coding problem tests frequency divisibility. The hash table, counting, and string interview pattern is demonstrated.
Amazon asks this to test the mathematical insight: if you pool all characters, each string needs total_freq[c] / n of each character c. This is only possible if every character's total frequency is divisible by n.
Total frequency + divisibility check. Count total frequency of every character across all strings. For each character, check if total_freq[c] % n == 0. If all pass, return true; else false.
words=["abc","aabc","bc"]. n=3. Total: a=3, b=3, c=3. 3%3=0 for all → true (each string gets [a,b,c]).
words=["ab","a"]. n=2. Total: a=3, b=1. 3%2≠0 → false.
Redistribute Characters tests the "equal distribution" pattern: pooling resources and checking divisibility by the recipient count. This appears in: "divide candy equally," "split array into equal-sum parts," "distribute items evenly." The key insight is always: total_count % num_recipients must equal 0 for every resource type.