https://github.com/ianchen0119/lc-sol
My leetcode solutions
https://github.com/ianchen0119/lc-sol
Last synced: 28 days ago
JSON representation
My leetcode solutions
- Host: GitHub
- URL: https://github.com/ianchen0119/lc-sol
- Owner: ianchen0119
- Created: 2023-01-18T23:36:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T21:36:43.000Z (over 2 years ago)
- Last Synced: 2025-02-16T22:42:43.981Z (4 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My leetcode solutions (golang)
## Content
- [Top 100 liked questions](https://leetcode.com/problem-list/top-100-liked-questions/)## cheat sheet
### Map
```go
make(map[int]int)// memery optimization
make(map[int]int, size)
```### Slice
```go
s := []int{0 ,1, 2, 3}
// s[include:exclude]
s[1:] // 1, 2, 3
s[:2] // 0, 1
```### String convert
```go
// Integer to String
strconv.Itoa()
// String to Integer
strconc.Atoi()
```