Skip to content

Commit fb61765

Browse files
authored
Create Saul.md
1 parent 86225d7 commit fb61765

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

2018.12.1-leetcode387/Saul.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```java
2+
class Solution {
3+
public static int firstUniqChar(String s) {
4+
int result = -1;
5+
char[] chars = s.toCharArray();
6+
for (int i = 0; i < chars.length; i++) {
7+
if (s.lastIndexOf(chars[i]) == s.indexOf(chars[i])) {
8+
result = i;
9+
break;
10+
}
11+
}
12+
return result;
13+
}
14+
15+
}

0 commit comments

Comments
 (0)