Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithm004-01/algorithm004-01
/ functions
Functions
6,280 in github.com/algorithm004-01/algorithm004-01
⨍
Functions
6,280
◇
Types & classes
2,806
Method
binarySearch3
�Ҳ�߽����
Week 03/id_536/leetcode_69_536.cpp:54
Method
binarySearch3
�ⷨ3���Ҳ�߽���� ʱ�临�Ӷ�:O(n) �ռ临�Ӷ�:O(1) *****/
Week 03/id_536/leetcode_704_536.cpp:79
Method
bomb
Week 03/id_151/LeetCode_200_151.cpp:15
Method
bubbleSort
冒泡排序 稳定
Week 07/id_476/Sort.java:48
Method
bubbleSort
(int[] arr)
Week 07/id_081/BubbleSort.java:4
Function
bubble_sort
(arr)
Week 07/id_556/SortFuntions.py:5
Function
buildTree
(preOrder, inOrder)
Week 03/id_256/LeetCode_105_256.js:20
Function
buildTree
(preorder []int, inorder []int)
Week 02/id_011/construct-binary-tree-from-preorder-and-inorder-traversal.go:3
Function
buildTree
(preorder []int, inorder []int)
Week 02/id_736/LeetCode_105_736.go:10
Method
buildTree
Week 02/id_166/105.construct-binary-tree-from-preorder-and-inorder-traversal.cpp:12
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_431/LeetCode_105_431.java:9
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_021/algorithm/src/main/java/com/lqw/algorithm/recursion/SolutionFour.java:30
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_321/LeetCode_105.2_321.java:4
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_321/LeetCode_105.1_321.java:4
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_281/LeetCode_105_281.java:29
Method
buildTree
仿解1:分治+哈希表 @author Shaobo.Qian @date 2019/11/6 @myProblem (因为一开始没理解为什么需要前序遍历数组和中序遍历数组才能确定树的样子) @link https://leetcode-cn.com/problems/construct-binar
Week 02/id_371/Leetcode_105_371.java:30
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_516/LeetCode_105_516.java:41
Method
buildTree
:type preorder: List[int] :type inorder: List[int] :rtype: TreeNode
Week 02/id_251/LeetCode_105_251.py:36
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_416/LeetCode_105_416.java:36
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_436/Leetcode_105_436.java:17
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_241/LeetCode_105_241.java:13
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_311/LeetCode_105_Solution.java:34
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_491/LeetCode_105_491.java:6
Method
buildTree
(self, preorder: [int], inorder: [int])
Week 02/id_196/LeetCode_105_196.py:2
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_081/ConstructBinaryTreeFromPreorderAndInorderTraversal.java:6
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_611/LeetCode_105_611.java:16
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_641/lesson7/Leetcode105.java:47
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_156/105_java.java:8
Method
buildTree
(self, preorder: list, inorder: list)
Week 02/id_701/leetcode_105_701.py:10
Method
buildTree
(int[] preorder, int[] inorder)
Week 02/id_506/LeetCode_105_506.java:2
Method
buildTreePostIn
(int[] inorder, int[] postorder)
Week 02/id_321/LeetCode_105.3_321.java:7
Function
buildTree_1
(preorder, inorder)
Week 02/id_246/LeetCode_105_246.py:30
Function
buildTree_2
(preorder, inorder)
Week 02/id_246/LeetCode_105_246.py:52
Method
canChangeRight
Week 03/id_616/LeetCode_860_616.cpp:3
Method
canCross
(self, stones: List[int])
Week 05/id_636/LeetCode_403_636.py:2
Method
canCross1
防解1:循环+map @author Shaobo.Qian @date 2019/12/1 @link https://leetcode.com/problems/frog-jump/discuss/88824/Very-easy-to-understand-JAVA-solution-with
Week 05/id_371/Leetcode_403_371.java:36
Method
canCross2
防解2:dfs @author Shaobo.Qian @date 2019/12/1 @link https://leetcode.com/problems/frog-jump/discuss/88804/JAVA-DFS-17ms-beat-99.28-so-far
Week 05/id_371/Leetcode_403_371.java:26
Function
canJump
(nums []int)
Week 03/id_011/jump-game.go:3
Function
canJump
(nums)
Week 03/id_571/leetcode_55_571.js:5
Function
canJump
https://leetcode-cn.com/problems/jump-game/ 跳跃游戏 贪心算法 要点:从最后1个位置往前找,如果前面的位置能够到达指定的后面的位置,说明是可达的,然后就更新要判断的位置,一直到结束 如果最后没有办法回到起始位置,说明不能到达最后一个位置
Week 03/id_716/LeetCode_55_716.go:9
Function
canJump
(nums)
Week 03/id_016/LeetCode_55_016.js:59
Function
canJump
(nums)
Week 03/id_336/LeetCode_336_55.js:6
Function
canJump
(nums)
Week 03/id_246/LeetCode_55_246.py:21
Method
canJump
:type nums: List[int] :rtype: bool
Week 03/id_101/[55]Jump Game.py:29
Method
canJump
循环nums判断当前的最大值是否大于等于数组的索引 @param nums @return
Week 03/id_431/LeetCode_55_431.java:35
Method
canJump
(self, nums)
Week 03/id_381/leetcode-55.py:4
Method
canJump
(int[] nums)
Week 03/id_686/LeetCode_55_686.java:26
Method
canJump
(int[] nums)
Week 03/id_306/JumpGame.java:6
Method
canJump
(int[] nums)
Week 03/id_321/LeetCode_55_321.java:5
Method
canJump
Week 03/id_616/LeetCode_55_616.cpp:3
Method
canJump
(int[] nums)
Week 03/id_241/LeetCode_55_241.java:6
Method
canJump
Week 03/id_651/LeetCode_55_651.cpp:26
Method
canJump
Week 03/id_586/55-jump-game.cc:3
Method
canJump
(int[] nums)
Week 03/id_491/LeetCode_55_491.java:2
Method
canJump
(int[] nums)
Week 03/id_081/JumpGame.java:6
Method
canJump
Week 03/id_151/LeetCode_55_151.cpp:3
Method
canJump
(int[] nums)
Week 03/id_611/LeetCode_55_611.java:9
Method
canJump
(int[] nums)
Week 03/id_141/LeeCode_55_141.java:7
Method
canJump
贪心算法:从后往前,记录能够跳到最后那一个位置的第一个下标值 简单理解就是,从最后位置向前看,能否到达最后
Week 03/id_286/LeetCode_55_286.java:9
Method
canJump1
(int[] nums)
Week 03/id_321/LeetCode_55_321.java:22
Method
climbStair3
重接1:递归+数组缓存 @author Shaobo.Qian @date 2019/11/9
Week 02/id_371/Leetcode_70_371.java:38
Method
climbStair4
动态规划(自顶向下) +数组缓存 @param n @return
Week 02/id_371/Leetcode_70_371.java:22
Function
climbStairs
(n int)
Week 05/id_631/LeetCode_70_631.go:1
Function
climbStairs
(n)
Week 03/id_256/LeetCode_70_256.js:12
Function
climbStairs
(n)
Week 01/id_571/leetcode_70_571.js:5
Function
climbStairs
(n)
Week 02/id_571/leetcode_70_571.js:5
Function
climbStairs
* 假设你正在爬楼梯,需要 n 阶你才能到达楼顶。 * 每次你可以爬 1 或 2 个台阶,你有多少种不同的方法可以爬到楼顶呢? * * 1. 递归的方法:运行超时 * * 递归公式为 : f(n) = f(n - 1) + f(n - 2) * f(1
Week 02/id_586/70-climbing-stairs.c:15
Method
climbStairs
(int n)
Week 05/id_686/LeetCode_70_686.java:30
Method
climbStairs
:type n: int :rtype: int
Week 05/id_251/LeetCode_70_251.py:36
Method
climbStairs
DP方程: F(N) = F(N-1) + F(N-2)
Week 05/id_111/leetcode70_111.py:14
Method
climbStairs
(self, n: int)
Week 08/id_381/leetcode_70.py:3
Method
climbStairs
使用递归思想解决问题 @param n @return
Week 01/id_431/LeetCode_70_431.java:13
Method
climbStairs
(int n)
Week 01/id_416/LeetCode_70_416.java:45
Method
climbStairs
Basically it's a fibonacci r if we look at it closer, it is clear that this is basically a fibonacci number, with the starting numbers as 1 and 2, ins
Week 01/id_576/_70ClimbStairs.java:55
Method
climbStairs
(int n)
Week 01/id_346/ClimbStairs_70.java:12
Method
climbStairs
Week 02/id_561/LeetCode_70_561.cpp:31
Method
climbStairs
注意输入的层数,有可能出来的数会超过正整数的限制 @param n @return
Week 02/id_306/ClimbStairs.java:11
Method
climbStairs
原解1.递归(斐波那契数列) @param n @return1
Week 02/id_371/Leetcode_70_371.java:100
Method
climbStairs
(int n)
Week 02/id_241/LeetCode_70_241.java:6
Method
climbStairs1
(int n)
Week 01/id_576/_70ClimbStairs.java:13
Method
climbStairs1
解法一:循环求解
Week 02/id_286/LeetCode_70_286.java:8
Function
climbStairs11
https://leetcode-cn.com/problems/climbing-stairs 爬楼梯 1. 递归 1.1 这个实现复杂度太高,指数级增长,超出了时间限制,具体的时间复杂度分析可以尝试思考
Week 02/id_716/LeetCode_70_716.go:8
Function
climbStairs12
1.2 尾递归优化,降低时间复杂度
Week 02/id_716/LeetCode_70_716.go:14
Function
climbStairs2
2. 迭代法
Week 02/id_716/LeetCode_70_716.go:34
Method
climbStairs2
(int n)
Week 01/id_511/LeetCode_70_511.java:23
Method
climbStairs2
方法二:dynamic programming 第 ii 阶可以由以下两种方法得到: 在第 (i-1)(i−1) 阶后向上爬一阶。 在第 (i-2)(i−2) 阶后向上爬 22 阶。 所以到达第 ii 阶的方法总数就是到第 (i-1)(i−1) 阶和第 (i-2)(i−2) 阶的方法数之和。
Week 01/id_576/_70ClimbStairs.java:37
Method
climbStairs2
仿解2: 递归 + 数组缓存
Week 02/id_371/Leetcode_70_371.java:57
Method
climbStairs2
递归求解:傻递归和记忆化递归(优化)
Week 02/id_286/LeetCode_70_286.java:31
Method
climbStairsNum
(int n)
Week 01/id_416/LeetCode_70_416.java:39
Method
climbStairs_dynamic
动态规划 @param n @return
Week 02/id_306/ClimbStairs.java:55
Method
climbStairs_fibonacci
斐波那契 @param n @return
Week 02/id_306/ClimbStairs.java:73
Method
climb_Stairs_bl
暴力递归方式 @param i @param n @return
Week 02/id_306/ClimbStairs.java:23
Method
climbingStair
(int n)
Week 01/id_276/ClimbingStairs.java:26
Function
coinChange
(coins, amount)
Week 06/id_256/LeetCode_322_256.js:13
Function
coinChange
(coins, amount)
Week 03/id_441/coin-change.js:4
Method
coinChange
使用递归方程 @param coins @param amount @return
Week 05/id_431/LeetCode_322_431.java:18
Method
coinChange
(int[] coins, int amount)
Week 05/id_106/322.coin-change.java:42
Method
coinChange
(int[] coins, int amount)
Week 05/id_286/LeetCode_322_286.java:5
Method
coinChange
(int[] coins, int amount)
Week 05/id_471/LeetCode_322_471.java:2
Method
coinChange
(int[] coins, int amount)
Week 03/id_686/LeetCode_322_686.java:22
← previous
next →
2,501–2,600 of 6,280, ranked by callers