Practice Check if All Characters Have Equal Number of Occurrences
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Easy#1941
LeetCode ProblemCheck if All Characters Have Equal Number of Occurrences
Problem Statement
Given a string s, return true if s is a good string, or false otherwise. A string s is good if all the characters that appear in s have the same number of occurrences (i.e., the same frequency).
Source: Check if All Characters Have Equal Number of Occurrences on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
s = "abacbc"
Output
true
# Example 2
Input
s = "aaabb"
Output
false
Constraints
1 <= s.length <= 1000
s consists of lowercase English letters.
Related LeetCode Problems
Practice more problems similar to Check if All Characters Have Equal Number of Occurrences.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.