The Letter Ledger
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L4
Problem
Implement CharFrequency(s) with method get_counts() returning a list of [char, count] pairs for distinct characters in s, sorted alphabetically. Ignore spaces. Test harness constructs the class and calls .get_counts().
Summary
Every character has a count to answer for.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.