MCPcopy Create free account

hub / github.com/DinghaoLI/Coding-Interviews-Golang / functions

Functions178 in github.com/DinghaoLI/Coding-Interviews-Golang

↓ 14 callersMethodPush
(value interface{})
007-用两个栈实现队列/problem007.go:18
↓ 11 callersMethodLength
Length of Maxheap
utils/maxHeap.go:22
↓ 11 callersMethodPop
()
007-用两个栈实现队列/problem007.go:22
↓ 10 callersFunctionisNumber
(str string)
054-表示数值的字符串/problem054.go:7
↓ 9 callersFunctiongetNext
(node *TreeNode)
058-二叉树的下一个结点/problem058.go:14
↓ 8 callersFunctiongetKth
(root *TreeNode, k int)
063-二叉搜索树的第K个结点/problem063.go:13
↓ 7 callersMethodInsert
Inserting items requires ensuring the nature of the Maxheap
utils/maxHeap.go:43
↓ 7 callersMethodPush
(value interface{})
utils/stack.go:19
↓ 6 callersMethodGetOnceAppear
()
055-字符流中第一个不重复的字符/problem055.go:17
↓ 6 callersMethodInsert
(char byte)
055-字符流中第一个不重复的字符/problem055.go:12
↓ 6 callersFunctionrotateString
(str string, shift int)
042-左旋转字符串/problem042.go:7
↓ 5 callersMethodDeleteMax
Delete and return the Maximum
utils/maxHeap.go:54
↓ 5 callersMethodDeleteMin
Delete and return the Minimum
utils/minHeap.go:54
↓ 5 callersMethodGetMedian
()
064-数据流之中的中位数/problem064.go:39
↓ 5 callersMethodInsert
Inserting items requires ensuring the nature of the Minheap
utils/minHeap.go:43
↓ 5 callersMethodInsert
(num int)
064-数据流之中的中位数/problem064.go:13
↓ 5 callersMethodIsEmpty
()
007-用两个栈实现队列/problem007.go:14
↓ 5 callersFunctionOnes
(n int)
010-二进制中1的个数/problem010.go:4
↓ 5 callersFunctionOnes
f(n) = n1*f(10bit-1) + f(n – n1*10bit) + LEFT; 其中 if(n1 == 1) LEFT = n - 10bit+ 1; else LEFT = 10bit;
032-从1到n整数中1出现的次数/problem032.go:14
↓ 5 callersFunctionPow
(base float64, exp int)
011-数值的整数次方/problem011.go:8
↓ 5 callersFunctionminK
(nums []int, k int)
030-最小的K个数/problem030.go:9
↓ 5 callersFunctionmyAtoi
(str string)
049-把字符串转换成整数/problem049.go:8
↓ 4 callersFunctionFibonacci
(n int)
009-斐波那契数列/problem009.go:3
↓ 4 callersMethodLen
()
utils/stack.go:7
↓ 4 callersFunctionPrint
(root *TreeNode)
019-二叉树的镜像/problem019.go:22
↓ 4 callersMethodTop
()
utils/stack.go:23
↓ 4 callersFunctiongetMostFreq
(nums []int)
029-数组中出现次数超过一半的数字/problem029.go:5
↓ 4 callersFunctioninOrder
(root *TreeNode)
058-二叉树的下一个结点/problem058.go:43
↓ 4 callersFunctionkthNode
(head *NodeList, k int)
015-链表中倒数第k个结点/problem015.go:12
↓ 3 callersFunctionAdd
(n, m int)
047-不用加减乘除做加法/problem047.go:7
↓ 3 callersMethodGetMax
Get the Maximum of the Maxheap
utils/maxHeap.go:35
↓ 3 callersMethodLength
Length of Minheap
utils/minHeap.go:22
↓ 3 callersMethodPop
()
utils/stack.go:30
↓ 3 callersFunctioncount
Binary search
038-数字在排序数组中出现的次数/problem038.go:8
↓ 3 callersFunctioncycle
(n,m int)
045-孩子们的游戏(圆圈中最后剩下的数)/problem045.go:7
↓ 3 callersFunctionfirstCommon
长链表先走,实现右对齐
037-两个链表的第一个公共结点/problem037.go:13
↓ 3 callersFunctionfirstCommonMap
Hashmap
037-两个链表的第一个公共结点/problem037.go:47
↓ 3 callersFunctionhasSubRootOrTree
(p *TreeNode, c *TreeNode)
018-树的子结构/problem018.go:15
↓ 3 callersFunctionisPostOrder
(post []int)
024-二叉搜索树的后序遍历序列/problem024.go:8
↓ 3 callersFunctionmax
(a, b int)
039-平衡二叉树[附加]/problem039.go:53
↓ 3 callersFunctionminNumberInRotateArray
(array []int)
008-旋转数组的最小数字/problem008.go:3
↓ 3 callersFunctionpoker
(nums []int)
044-扑克牌顺子/problem044.go:8
↓ 3 callersFunctionprint
(head *ListNode)
017-合并两个排序的链表/problem017.go:12
↓ 3 callersFunctionprint
(head *NodeList)
016-反转链表/problem016.go:27
↓ 3 callersFunctionreverse
(head *NodeList)
016-反转链表/problem016.go:12
↓ 3 callersFunctionreverseString
(s []byte)
042-左旋转字符串/problem042.go:16
↓ 3 callersFunctionreverseString
(s []byte)
042-翻转单词顺序列/problem042.go:23
↓ 3 callersFunctionscanDigits
(str string, start int)
054-表示数值的字符串/problem054.go:48
↓ 3 callersFunctionstackOrder
(in []int, out []int)
022-栈的压入弹出序列/problem022.go:9
↓ 3 callersFunctionstringPermutation
(str string)
028-字符串的排列/problem028.go:7
↓ 2 callersMethodGetMin
Get the Minimum of the Minheap
utils/minHeap.go:35
↓ 2 callersFunctionInversePairs
(nums []int)
036-数组中的逆序对/problem036.go:7
↓ 2 callersMethodMax
Get the Maximum of the Maxheap
utils/maxHeap.go:27
↓ 2 callersFunctionMirrorTree
(p *TreeNode)
019-二叉树的镜像/problem019.go:15
↓ 2 callersFunctionNewMaxHeap
MaxHeap constructor
utils/maxHeap.go:15
↓ 2 callersFunctionPowNormal
(base float64, exp int)
011-数值的整数次方/problem011.go:27
↓ 2 callersFunctionPowNormal
(base float64, exp int)
012-打印1到最大的N位数/problem012.go:29
↓ 2 callersFunctionPrint
(root *TreeNode)
023-从上往下打印二叉树/problem023.go:31
↓ 2 callersFunctionSerialize
(root *TreeNode)
062-序列化二叉树/problem062.go:14
↓ 2 callersFunctionTreeToList
(root *TreeNode)
027-二叉搜索树与双向链表/problem027.go:15
↓ 2 callersFunctionZprint
(root *TreeNode)
061-按之字形顺序打印二叉树/problem061.go:13
↓ 2 callersFunctionabs
(a int)
039-平衡二叉树[附加]/problem039.go:46
↓ 2 callersFunctionagain
(nums []int)
051-数组中重复的数字/problem051.go:7
↓ 2 callersFunctionarraySum
(target int)
041-和为S的连续正数序列/problem041.go:7
↓ 2 callersFunctioncount
(str string)
035-第一个只出现一次的字符位置/problem035.go:7
↓ 2 callersFunctiongetMinStr
(nums []int)
033-把数组排成最小的数/problem033.go:8
↓ 2 callersFunctiongetTreeByLevel
(root *TreeNode)
023-从上往下打印二叉树/problem023.go:13
↓ 2 callersFunctionisE
(str string, start int)
054-表示数值的字符串/problem054.go:56
↓ 2 callersFunctionmin
(a,b int)
034-丑数/problem034.go:31
↓ 2 callersFunctionoddFirst
(s []int)
014-调整数组顺序使奇数位于偶数前面/problem014.go:8
↓ 2 callersFunctionprint
(head *RandNodeList)
026-复杂链表的复制/problem026.go:39
↓ 2 callersFunctionprint
(root *TreeNode)
060-把二叉树打印成多行/problem060.go:13
↓ 2 callersFunctionprint
(root *TreeNode)
062-序列化二叉树/problem062.go:67
↓ 2 callersFunctionprintLeft
(root *TreeNode)
027-二叉搜索树与双向链表/problem027.go:48
↓ 2 callersFunctionprintRight
(root *TreeNode)
027-二叉搜索树与双向链表/problem027.go:40
↓ 2 callersFunctionreverseWord
(str string)
042-翻转单词顺序列/problem042.go:7
↓ 2 callersFunctionshowN
012
012-打印1到最大的N位数/problem012.go:42
↓ 1 callersMethodCap
()
utils/stack.go:15
↓ 1 callersFunctionCopyRandRandNodeList
(head *RandNodeList)
026-复杂链表的复制/problem026.go:13
↓ 1 callersFunctionDeserialize
(str string)
062-序列化二叉树/problem062.go:35
↓ 1 callersFunctionDeserializeTree
(str string)
062-序列化二叉树/problem062.go:42
↓ 1 callersFunctionFind
用了分治的思想,根据题意可得 从数组中选取数字,和目标数字的关系有三种情况:=,<或>。 如果是等于则查找成功; 如果是数组中元素小于要查找的数字,说明要查找的数字应该在当前位置的右边或下边。 如果是数组中元素大于要查找的数字,说明要查找的数字应该在当前位置的左边或上边。 即 对于数组中的任何一个元
003-二维数组中的查找/problem003.go:32
↓ 1 callersMethodIsEmpty
()
utils/stack.go:11
↓ 1 callersFunctionMaxSubset
dp[i] 代表以i结尾时最大连续子数组的最大和 dp[i] 初始值为nums[0] 计算dp[i]时 如果dp[i-1]>0: 那我们放心的加进来所以dp[i] = nums[i]+dp[i-1] 否则:dp[i]取自己 dp[i] = nums[i] 再利用全局变量,保存出出现过的最大值
031-连续子数组的最大和/problem031.go:13
↓ 1 callersFunctionMaxSubset2
精简一些 dp[i] 代表以i结尾时最大连续子数组的最大和(同时) 复制nums到dp 如果dp[i-1]>0那就把dp[i]=dp[i-1]+dp[i] 再利用全局变量,保存出出现过的最大值
031-连续子数组的最大和/problem031.go:38
↓ 1 callersMethodMin
Get the Minimum of the Minheap
utils/minHeap.go:27
↓ 1 callersFunctionMinOrder
顺序查找
008-旋转数组的最小数字/problem008.go:35
↓ 1 callersFunctionNewMinHeap
MinHeap constructor
utils/minHeap.go:15
↓ 1 callersFunctionPow
problem 011
012-打印1到最大的N位数/problem012.go:11
↓ 1 callersFunctionSerializeTree
(root *TreeNode, str string)
062-序列化二叉树/problem062.go:23
↓ 1 callersFunctiongetUgly
(N int)
034-丑数/problem034.go:7
↓ 1 callersFunctionhasSub
(p *TreeNode, c *TreeNode)
018-树的子结构/problem018.go:28
↓ 1 callersFunctioninf
(a, b int)
033-把数组排成最小的数/problem033.go:58
↓ 1 callersFunctionisDigital
(b byte)
049-把字符串转换成整数/problem049.go:46
↓ 1 callersFunctionmergeTwoLists
(l1 *ListNode, l2 *ListNode)
017-合并两个排序的链表/problem017.go:19
↓ 1 callersFunctionmultiArray
(nums []int)
052-构建乘积数组/problem052.go:7
↓ 1 callersFunctionpow
(a,b int)
032-从1到n整数中1出现的次数/problem032.go:40
↓ 1 callersFunctionprint
(root *TreeNode)
063-二叉搜索树的第K个结点/problem063.go:37
↓ 1 callersFunctionprintInOrder
(root *TreeNode)
006-重建二叉树/problem006.go:21
↓ 1 callersFunctionprintListFromTailToHead
just print it form tail to head and do not modify the original NodeList
005-从尾到头打印链表(ing)/problem005.go:14
next →1–100 of 178, ranked by callers