Skip to content

Commit 4f2cc57

Browse files
refactor 520
1 parent 40d150b commit 4f2cc57

File tree

1 file changed

+0
-21
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_520.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 520. Detect Capital
5-
*
6-
* Given a word, you need to judge whether the usage of capitals in it is right or not.
7-
* We define the usage of capitals in a word to be right when one of the following cases holds:
8-
9-
All letters in this word are capitals, like "USA".
10-
All letters in this word are not capitals, like "leetcode".
11-
Only the first letter in this word is capital if it has more than one letter, like "Google".
12-
Otherwise, we define that this word doesn't use capitals in a right way.
13-
14-
Example 1:
15-
Input: "USA"
16-
Output: True
17-
18-
Example 2:
19-
Input: "FlaG"
20-
Output: False
21-
22-
Note: The input will be a non-empty word consisting of uppercase and lowercase latin letters.
23-
*/
243
public class _520 {
254
public static class Solution1 {
265
public boolean detectCapitalUse(String word) {

0 commit comments

Comments
 (0)