Halloween Sale
Unlock all premium questions for over 30% off
Lowercase Before Uppercase Letter Count
Medium
Question
Each character of s is a letter, written in lowercase or in uppercase. Treating 'x' and 'X' as the same letter, count how many distinct letters satisfy this condition: no lowercase copy of the letter shows up after the first uppercase copy of it. Whenever a letter is used in a single case throughout s, there is nothing to compare, and it meets the condition by default.
...
Asked at:Microsoft
More Microsoft interview questions
- Minimum Adjacent Swaps for Ball Groupingmedium
- Valid Clock Time Combinationsmedium
- Office Gift Delivery Schedulerhard
- Recent Search History Systemhard
- Largest Shared BST Valuemedium
- Minimum Coins to Cover All Amountsmedium
- Group Elements by Common Propertiesmedium
- Largest Tree Root IDmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.