DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Letter Tally

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
L3

Problem

Implement CharCounter(text) with method get_counts() returning a list of [char, count] pairs sorted alphabetically by character. Ignore spaces and punctuation. Test harness constructs the class from the input string and calls get_counts.

Summary

Each character in the string 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.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons