An open API service indexing awesome lists of open source software.

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

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()
```