Tap here to switch tabs
Problem
Submissions

Problem: Redistribute Characters to Make All Strings Equal

med
30 min
Try to solve the Redistribute Characters to Make All Strings Equal problem.

Statement

You are given an array of strings words.

In one operation, you can choose two distinct indices i and j, remove any character from words[i], and insert it at any position in words[j].

Return true if it is possible to make every string in words equal after applying any number of operations, or false otherwise.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Redistribute Characters to Make All Strings Equal

med
30 min
Try to solve the Redistribute Characters to Make All Strings Equal problem.

Statement

You are given an array of strings words.

In one operation, you can choose two distinct indices i and j, remove any character from words[i], and insert it at any position in words[j].

Return true if it is possible to make every string in words equal after applying any number of operations, or false otherwise.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists of lowercase English letters.