Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aizk/algorithm-practice
/ functions
Functions
147 in github.com/aizk/algorithm-practice
⨍
Functions
147
◇
Types & classes
25
Function
main
()
back-track/n-queens/main.go:8
Function
main
()
back-track/full-permutation/full-permutation.go:7
Function
main
()
list/reverse-print-list/main.go:8
Function
main
()
list/0002-add-two-numbers/main.go:3
Function
main
给定一个正整数 n,将其拆分为至少两个正整数的和,并使这些整数的乘积最大化。 返回你可以获得的最大乘积。 示例 1: 输入: 2 输出: 1 解释: 2 = 1 + 1, 1 × 1 = 1。 示例 2: 输入: 10 输出: 36 解释: 10 = 3 + 3 + 4, 3 × 3 × 4
dp/0343-integer-break/main.go:20
Function
main
()
dp/0518-coin-change-2/main.go:5
Function
main
()
dp/0811-coin-lcci/coin.go:9
Function
main
()
dp/0322-coin-change/main.go:5
Function
main
()
dp/0300/main.go:5
Function
main
()
dp/0416/0416.go:3
Function
main
()
string/版本号解析/main.go:9
Function
main
()
string/isDeformation/main.go:5
Function
main
()
string/replaceBlank/main.go:8
Function
main
()
string/intToString/main.go:8
Function
main
()
array/0033-search-in-rotated-sorted-array/main.go:5
Function
main
合并两个有序数组
array/合并两个有序数组/main.go:6
Function
main
()
leetcode/0007-reverse-integer/main.go:9
Function
main
()
leetcode/0020-valid-parentheses/valid-parentheses.go:5
Function
main
()
leetcode/0001-two-sum/main.go:5
Function
main
()
leetcode/0013-roman-to-integer/main.go:5
Function
main
()
leetcode/0062-unique-paths/m.go:5
Function
main
()
leetcode/0929-unique-email-addresses/main.go:5
Function
main
()
leetcode/0771-jewels-and-stones/main.go:5
Function
main
()
leetcode/0021-merge-two-sorted-lists/main.go:5
Function
main
()
tree/0106-construct-binary-tree-from-inorder-and-postorder-traversal/main.go:30
Function
main
()
tree/0129/m.go:13
Function
main
()
tree/0105-construct-binary-tree-from-preorder-and-inorder-traversal/main.go:29
Function
main
()
tree/0662-maximum-width-of-binary-tree/main.go:75
Method
maxPathSum
(self, root: Optional[TreeNode])
leetcode/124.二叉树中的最大路径和.py:15
Function
merge
合并 s -> m and m -> e 这两个数组
sort/merge/merge.go:54
Function
mergeSort
(array []int)
sort/merge/merge.go:3
Function
mergeTwoListsRecurse
递归的实现 假设函数可以排序,当 l1 小于 l2 时,l1 指向 递归函数返回的 l1 next 和 l2 的结果,反之,最终能得到结果
leetcode/0021-merge-two-sorted-lists/main.go:93
Function
myAtoi
请你来实现一个 atoi 函数,使其能将字符串转换成整数。 首先,该函数会根据需要丢弃无用的开头空格字符,直到寻找到第一个非空格的字符为止。接下来的转化规则如下: 如果第一个非空字符为正或者负号时,则将该符号与之后面尽可能多的连续数字字符组合起来,形成一个有符号整数。 假如第一个非空字符是数字
leetcode/0008-string-to-integer-atoi/m.go:69
Method
myAtoi
:type str: str :rtype: int
leetcode/0008-string-to-integer-atoi/r.py:5
Function
numJewelsInStones2
(J string, S string)
leetcode/0771-jewels-and-stones/main.go:31
Function
partition1
(a, s, e)
sort/quick/quick.py:29
Function
partition1_1
(a, i, j)
sort/quick/quick.py:51
Function
partition2
(a, s, e)
sort/quick/quick.py:80
Function
qs
(a, s, e)
sort/quick/quick.py:5
Function
recursive
(nums []int, S int, count *int)
dp/0494/0494.go:20
Function
resolve_
循环右移 1 - 7 位 与 1 作 & 运算判断第 x 位是不是 1
beauty-of-program/2.1 求二进制数中 1 的个数/main.go:13
Function
reverse2
%10 方法
leetcode/0007-reverse-integer/main.go:53
Method
reverseBetween
:type head: ListNode :type m: int :type n: int :rtype: ListNode
list/0092-reverse-linked-list-ii/main.py:7
Method
reverseKGroup
:type head: ListNode :type k: int :rtype: ListNode
list/0025-reverse-nodes-in-k-group/main.py:7
Method
twoSum
:type nums: List[int] :type target: int :rtype: List[int]
leetcode/0001-two-sum/cache.py:9
Function
widthOfBinaryTree
根据题意,单纯的 BFS 还不行,需要一些变化
tree/0662-maximum-width-of-binary-tree/main.go:80
Function
状态压缩
压缩掉了物品个数的状态 速度比二维快一倍
dp/0416/0416.go:43
← previous
101–147 of 147, ranked by callers