Skip to content

Commit e178253

Browse files
committed
fix: Valid Anagram
1 parent d83478e commit e178253

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Leetcode/0242.Valid-Anagram/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Follow up: What if the inputs contain Unicode characters? How would you adapt yo
9595
## 來源
9696
* https://leetcode.com/problems/valid-anagram/description/
9797
* https://leetcode.cn/problems/valid-anagram/description/
98-
* 數組雙指針技巧匯總](https://labuladong.github.io/algo/di-yi-zhan-da78c/shou-ba-sh-48c1d/shuang-zhi-fa4bd/)
98+
* [數組雙指針技巧匯總](https://labuladong.github.io/algo/di-yi-zhan-da78c/shou-ba-sh-48c1d/shuang-zhi-fa4bd/)
9999

100100
## 解答
101101
https://github.com/kimi0230/LeetcodeGolang/blob/master/Leetcode/0242.Valid-Anagram/main.go
@@ -149,5 +149,12 @@ func IsAnagram2(s string, t string) bool {
149149
## Benchmark
150150

151151
```sh
152-
152+
goos: darwin
153+
goarch: amd64
154+
pkg: LeetcodeGolang/Leetcode/0242.Valid-Anagram
155+
cpu: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
156+
BenchmarkIsAnagram-8 6703497 276.3 ns/op 0 B/op 0 allocs/op
157+
BenchmarkIsAnagram2-8 3660909 318.9 ns/op 48 B/op 2 allocs/op
158+
PASS
159+
ok LeetcodeGolang/Leetcode/0242.Valid-Anagram 4.498s
153160
```

Leetcode/0242.Valid-Anagram/main_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ func BenchmarkIsAnagram2(b *testing.B) {
5353

5454
/*
5555
go test -benchmem -run=none LeetcodeGolang/Leetcode/0242.Valid-Anagram -bench=.
56-
56+
goos: darwin
57+
goarch: amd64
58+
pkg: LeetcodeGolang/Leetcode/0242.Valid-Anagram
59+
cpu: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
60+
BenchmarkIsAnagram-8 6703497 276.3 ns/op 0 B/op 0 allocs/op
61+
BenchmarkIsAnagram2-8 3660909 318.9 ns/op 48 B/op 2 allocs/op
62+
PASS
63+
ok LeetcodeGolang/Leetcode/0242.Valid-Anagram 4.498s
5764
*/

0 commit comments

Comments
 (0)