Compute Difference Between Uppercase and Lowercase Letters
Note ->> See the Image Source section at the very bottom of the page for the original problem statement and etc.. 🐰🐰
100 years agoo0, a typing practice app wanted to test how well users balanced uppercase and lowercase letters in their entries. For every string a user typed, the app needed to count the number of uppercase and lowercase letters and calculate the difference between them—positive if uppercase dominated, negative if lowercase took the lead. It didn’t mind if the solution wasn’t the most efficient, as long as it could handle the text without breaking a sweat, even if it meant checking some letters more than once. With your help, the app could ensure everything stayed consistent and fun!
𓍢ִ໋🌷͙֒ ᩚMany thanks to Charlotte babyᰔ
1Example 1
2Example 2
Constraints
Limits and guarantees your solution can rely on.
- 0 ≤ typedText.length ≤ 100.