Versions in this module Expand all Collapse all v1 v1.0.1 Aug 11, 2020 Changes in this version + func CanMeasureWater(x, y, z int) bool + func CanPartition(nums []int) bool + func ClimbStairs(n int) int + func ClimbStairsDP(n int) int + func CombinationSum(candidates []int, target int) [][]int + func CombinationSumII(candidates []int, target int) [][]int + func Combine(n, k int) [][]int + func ContainsNearbyAlmostDuplicate(nums []int, k, t int) bool + func ContainsNearbyDuplicate(nums []int, k int) bool + func DeleteNode(node *ListNode) + func FindSubstring(s string, words []string) []int + func FourSum(nums []int, target int) [][]int + func HasPathSum(root *TreeNode, sum int) bool + func Int2Roman(num int) string + func IntegerBreak(n int) int + func InterSection(num1, num2 []int) []int + func IsAnagram(s string, t string) bool + func IsMatch(target, pattern string) bool + func IsPowerOfTwo(n int) bool + func IsSubtree1(s *TreeNode, t *TreeNode) bool + func IsSymmetric(root *TreeNode) bool + func IsValidParentheses(s string) bool + func IsValidSudoku(board [][]int) bool + func Knapsack01(w, v []int, c int) int + func Knapsack01DP(w, v []int, c int) int + func LadderLength(beginWord, endWord string, wordList []string) int + func LenghtOfLISWithBin(nums []int) int + func LengthOfLISDPReview(nums []int) int + func LengthOfLISWithDP(nums []int) int + func LengthOfLongestSubstring(s string) int + func LengthOfLongestSubstringReview(s string) int + func LengthOfLongestSubstringReview2(s string) int + func LengthOfLongestSubstringTwoDistinct(s string) int + func LetterCombinations(digits string) []string + func LevelOrder(root *TreeNode) [][]int + func LevelOrderBottom(root *TreeNode) [][]int + func MaxArea(height []int) int + func MaxDepth(root *TreeNode) int + func MaxSubArrayDC(nums []int) int + func MaxSubArrayDP(nums []int) int + func MaxSubArrayGreedy(nums []int) int + func MaximalSquare(matrix [][]byte) int + func MaximalSquare2(matrix [][]byte) int + func MinDepth(root *TreeNode) int + func MinSubArrayLen(s int, nums []int) int + func MinWindow(s, t string) string + func MinimumTotal(triangle [][]int) int + func MoveZeros(nums []int) []int + func Multiply(num1, num2 string) string + func MySqrt1(x int) int + func NumSquares(n int) int + func NumTreesViaCatalan(n int) int + func NumTreesViaDP(n int) int + func NumberIslands(grid [][]byte) int + func Permute(nums []int) [][]int + func PermuteUnique(nums []int) [][]int + func PreorderTraversal(root *TreeNode) []int + func PrintList(head *ListNode) + func PrintTree(root *TreeNode) + func RecordList(head *ListNode) + func RestoreIpAddress(s string) []string + func Rob(nums []int) int + func SingleNumber(nums []int) int + func SingleNumberII(nums []int) int + func SingleNumberIII(nums []int) []int + func SolveNQueens(n int) [][]string + func SortColorReview(nums []int) + func SortColors(nums []int) + func SpiralOrder(matrix [][]int) []int + func SuperEggDrop(k, n int) int + func ThreeSum(nums []int) [][]int + func TopKFrequent(nums []int, k int) []int + func TopKFrequentHeap(nums []int, k int) []int + func TopKFrequentHeapReview(nums []int, k int) []int + func TwoSum(nums []int, target int) []int + func TwoSumII(nums []int, target int) []int + func WordSearch(board [][]byte, word string) bool + type ListHeap []*ListNode + func (lh *ListHeap) Pop() interface{} + func (lh *ListHeap) Push(node interface{}) + func (lh ListHeap) Len() int + func (lh ListHeap) Less(i, j int) bool + func (lh ListHeap) Swap(i, j int) + type ListNode struct + Next *ListNode + Val int + func BuildList(elements []int) *ListNode + func MergeKLists(lists []*ListNode) *ListNode + func NewListNode(val int) *ListNode + func RemoveElements(head *ListNode, val int) *ListNode + func RemoveNthFromEnd(head *ListNode, n int) *ListNode + func ReverseBetween(head *ListNode, m, n int) *ListNode + func ReverseLinkedListIter(head *ListNode) *ListNode + func ReverseList(head *ListNode) *ListNode + func RotateRight(head *ListNode, k int) *ListNode + type NestedInteger struct + func (ni *NestedInteger) Add(elem NestedInteger) + func (ni *NestedInteger) GetInteger() int + func (ni *NestedInteger) IsInteger() bool + type NestedIterator struct + func Construct(nestedList []*NestedInteger) *NestedIterator + func (this *NestedIterator) HasNext() bool + func (this *NestedIterator) Next() int + type Node struct + type NodeHeap []*Node + func (h *NodeHeap) Pop() interface{} + func (h *NodeHeap) Push(x interface{}) + func (h NodeHeap) Len() int + func (h NodeHeap) Less(i, j int) bool + func (h NodeHeap) Swap(i, j int) + type Pair struct + func NewPair(first, second interface{}) *Pair + func (p *Pair) First() interface{} + func (p *Pair) Second() interface{} + type PairHeap []*Pair + func (ph *PairHeap) Pop() interface{} + func (ph *PairHeap) Push(val interface{}) + func (ph PairHeap) Len() int + func (ph PairHeap) Less(i, j int) bool + func (ph PairHeap) Swap(i, j int) + type TreeNode struct + Left *TreeNode + Right *TreeNode + Val int + func BuildTree(elements []int) *TreeNode + func InvertTree(root *TreeNode) *TreeNode + func LowestCommonAncestor(root, p, q *TreeNode) *TreeNode + func LowestCommonAncestorII(root, p, q *TreeNode) *TreeNode + func NewTreeNode(val int) *TreeNode