Skip to content

Commit 47abee9

Browse files
committed
add case
1 parent 1d23d52 commit 47abee9

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"strings"
6+
)
7+
8+
func strStr(haystack string, needle string) int {
9+
return strings.Index(haystack, needle)
10+
}
11+
12+
func run_strStr() {
13+
fmt.Println(strStr("sadbutsad", "sad"))
14+
fmt.Println(strStr("leetcode", "leeto"))
15+
}

Easy/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ func main() {
77
// run_isValid()
88
// run_longestCommonPrefix()
99
// run_removeDuplicates()
10-
run_removeElement()
10+
// run_removeElement()
11+
run_strStr()
1112
}

0 commit comments

Comments
 (0)