package
0.0.0-20241209140624-9fce2a725d55
Repository: https://github.com/elven9/my-leetcode.git
Documentation: pkg.go.dev
# README
First Unique Character in a String
Solution Idx | Time Complexity | Space Complexity | Comment |
---|---|---|---|
1 | O(n) | O(1) | scan, with two map, one for least index, one for freq |
2 | O(n) | O(1) | using array instead of map to speed up |