520. Detect Capital
We define the usage of capitals in a word to be right when one of the following cases holds: - All letters in this word are capitals, like "USA". - All letters in this word are not capitals, like "leetcode". - Only the first letter in this word is capital, like "Google". Given a string word, return true if the usage of capitals in it is right. Example 1: Input: word = "USA" Output: true E
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start