Compute Difference Between Uppercase and Lowercase Letters

Problem Overview

  • Given a string, compute the difference between counts of uppercase and lowercase letters.
  • Input: typedText (length 0–100); Output: integer (positive if uppercase dominates, negative if lowercase dominates, zero if equal).
  • Context: a typing practice app evaluating how users balance letter cases.
  • From Meta interviews; a coding interview problem and a common interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: