Documentation
¶
Index ¶
- func ContainsDuplicate(nums []int) bool
- func ContainsDuplicateHashMap(nums []int) bool
- func ContainsDuplicateShort(nums []int) bool
- func FirstUniqChar(s string) int
- func Generate(numRows int) [][]int
- func Intersect(nums1 []int, nums2 []int) []int
- func IsValid(s string) bool
- func LongestCommonPrefix(strs []string) string
- func LuckyNumbers(matrix [][]int) (ans []int)
- func MatrixReshape(mat [][]int, r int, c int) [][]int
- func Max(x, y int) int
- func MaxProfit(prices []int) int
- func MaxProfitOne(prices []int) int
- func MaxProfitPro(prices []int) int
- func MaxSubArray(nums []int) int
- func MaxSubArrayDivideConquer(nums []int) int
- func MaxSubArrayDynamic(nums []int) int
- func Merge(nums1 []int, m int, nums2 []int, n int)
- func MergeTwoLists(list1 *medium.ListNode, list2 *medium.ListNode) *medium.ListNode
- func MergeTwoPoint(nums1 []int, m int, nums2 []int, n int)
- func MergeTwoPointReverse(nums1 []int, m int, nums2 []int, n int)
- func MinimumDifference(nums []int, k int) int
- func ShortestCompletingWord(licensePlate string, words []string) (ans string)
- func StrStr(haystack string, needle string) int
- func TotalMoney(n int) (ans int)
- type MinStack
- type MovingAverage
- type Node590
- type OrderedStream
- type Status
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDuplicate ¶
func ContainsDuplicateShort ¶
func LuckyNumbers ¶
func MaxProfit ¶
买卖股票的最佳时机 思路: 有两种操作 买/卖 最优化买:对比 上一次买与这次买 选择最省钱的方式 最优化卖:对比 上次卖与这次卖 选择最赚钱的方式 4ms/3.6mb
func MaxSubArray ¶
func MaxSubArrayDynamic ¶
func MergeTwoLists ¶
func MinimumDifference ¶
func ShortestCompletingWord ¶
统计 licensePlate 中每个字母的出现次数(忽略大小写) 然后遍历 words 中的每个单词 若 26 个字母在该单词中的出现次数均不小于在 licensePlate 中的出现次数,则该单词是一个补全词 返回最短且最靠前的补全词
func TotalMoney ¶
因为每周七天存的钱之和比上一周多 77 块,因此每周存的钱之和的序列是一个等差数列,我们可以用等差数列求和公式来求出所有完整的周存的钱总和。 剩下的天数里,每天存的钱也是一个等差数列,可以用相同的公式进行求和。最后把两者相加可以得到答案。
Types ¶
type MinStack ¶
type MinStack struct {
// contains filtered or unexported fields
}
func MinStackConstructor ¶
func MinStackConstructor() MinStack
type MovingAverage ¶
type MovingAverage struct {
// contains filtered or unexported fields
}
func (*MovingAverage) Next ¶
func (this *MovingAverage) Next(val int) float64
type OrderedStream ¶
type OrderedStream struct {
// contains filtered or unexported fields
}
func OrderedStreamConstructor ¶
func OrderedStreamConstructor(n int) OrderedStream
Source Files
¶
- 101.go
- 108.go
- 1089.go
- 110.go
- 111.go
- 112.go
- 1175.go
- 118.go
- 1184.go
- 119.go
- 121.go
- 125.go
- 1252.go
- 1374.go
- 1380.go
- 14.go
- 141.go
- 1413.go
- 1417.go
- 1422.go
- 144.go
- 1460.go
- 1475.go
- 155.go
- 1582.go
- 1598.go
- 1608.go
- 1636.go
- 1640.go
- 1656.go
- 1672.go
- 168.go
- 169.go
- 171.go
- 1716.go
- 1791.go
- 190.go
- 191.go
- 1984.go
- 20.go
- 202.go
- 205.go
- 21.go
- 217.go
- 219.go
- 28.go
- 292.go
- 346.go
- 35.go
- 350.go
- 387.go
- 521.go
- 53.go
- 556.go
- 58.go
- 590.go
- 653.go
- 66.go
- 67.go
- 69.go
- 70.go
- 717.go
- 748.go
- 762.go
- 796.go
- 824.go
- 868.go
- 88.go
- 905.go
- 917.go
- 929.go
- 94.go
Click to show internal directories.
Click to hide internal directories.