Skip to content

Commit 7b62a24

Browse files
authored
Merge pull request #3 from Saul-Zhang/Saul-Zhang-patch-2
Create Saul.md
2 parents 695f1bf + fb61765 commit 7b62a24

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)