https://github.com/seihmd/leetcodeutil
Go util for Leetcode problems
https://github.com/seihmd/leetcodeutil
go golang leetcode leetcode-golang
Last synced: 3 months ago
JSON representation
Go util for Leetcode problems
- Host: GitHub
- URL: https://github.com/seihmd/leetcodeutil
- Owner: seihmd
- License: mit
- Created: 2018-04-21T14:55:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-30T13:02:36.000Z (about 5 years ago)
- Last Synced: 2024-06-20T12:04:54.691Z (over 1 year ago)
- Topics: go, golang, leetcode, leetcode-golang
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# leetcodeutil
Go util for [Leetcode](https://leetcode.com/) problems## usage
``` go
import . "github.com/seihmd/leetcodeutil"func problemTakesTreeNode(t *TreeNode) {}
func problemTakesListNode(l *ListNode) {}
func problemTakesMatrix(m [][]int) {}
func problemTakesIntervals(i []Interval) {}
func problemTakesIntSlice(i []int) {}
func problemTakesIntSlices(i [][]int) {}// solve problems!
func Solve() {
problemTakesTreeNode(BinaryTree("[1,2,3,null,5]"))
problemTakesListNode(LinkedList("[1,2,3,4,5]"))
problemTakesMatrix(Matrix("[[1,2,3],[4,5,6],[7,8,9]]"))
problemTakesIntervals(Intervals("[[1,2],[5,6],[8,9]]"))
problemTakesIntSlice(IntSlice("[1,2,3]"))
problemTakesIntSlices(IntSlices("[[1],[2,3],[4,5,6]]"))
}
```## godoc
https://godoc.org/github.com/seihmd/leetcodeutil