Skip to content

Commit

Permalink
Removed unnecessary code
Browse files Browse the repository at this point in the history
Signed-off-by: Lanre Adedara <[email protected]>
  • Loading branch information
klever34 committed Apr 9, 2024
1 parent d4ba58b commit f5a18b3
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions lcci/01.02.Check Permutation/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,33 +269,6 @@ impl Solution {
}
```

```swift
class Solution {
func CheckPermutation(_ s1: String, _ s2: String) -> Bool {
if s1.count != s2.count {
return false
}

var cnt = Array(repeating: 0, count: 26)

for char in s1 {
let index = Int(char.asciiValue! - Character("a").asciiValue!)
cnt[index] += 1
}

for char in s2 {
let index = Int(char.asciiValue! - Character("a").asciiValue!)
cnt[index] -= 1
if cnt[index] < 0 {
return false
}
}

return true
}
}
```

<!-- tabs:end -->

<!-- end -->

0 comments on commit f5a18b3

Please sign in to comment.