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
NumIslands
(char[][] grid)
Week 03/id_546/LeetCode_200_546.cs:17
Method
Number
Week 01/id_561/LeetCode_1_561.cpp:28
Method
Pair
(String key, Integer val)
Week 03/id_216/Week03.java:13
Method
Pair
(String word, int level)
Week 03/id_716/LeetCode_127_716.java:96
Method
Path
<summary> 第三种方法,遍历树,并且记录下遍历路径,当找到p或者q的任意一个时,将当前索引保存下, 继续遍历去寻找另外一个,并且保存遍历路径,如果遇到路径回退,并且回退到索引之后,索引自减, 直到找到另外一个之后,索引所处位置就是公共祖先位置。 </summary> <param name=
Week 02/id_171/LowestCommonAncestorOfABinaryTreeSol.cs:112
Method
PeakValley
<summary> 峰谷法,在谷买,在峰卖,减少购买次数 </summary> <param name="prices"></param> <returns></returns>
Week 03/id_171/BestTimeToBuyAndSellStockIISol.cs:21
Method
Permute
(int[] nums)
Week 02/id_546/LeetCode_46_546.cs:14
Method
PermuteUnique
(int[] nums)
Week 02/id_546/LeetCode_47_546.cs:16
Method
PlusOne
(int[] digits)
Week 01/id_171/PlusOneSol.cs:12
Method
PlusOneOne
(int[] digits)
Week 01/id_171/PlusOneSol.cs:34
Method
Point
(int x, int y)
Week 06/id_346/LeetCode_130_346.java:55
Method
Point
(int x, int y)
Week 03/id_306/NumIslands_bfs.java:14
Method
Point
(int x, int y)
Week 03/id_306/NumIslands_dfs.java:11
Function
PostOrderTraversal
PostOrderTraversal 二叉树后续遍历
Week 02/id_531/leetCode_145_531.go:4
Method
Postorder
(Node root)
Week 02/id_546/LeetCode_590_546.cs:27
Method
PreOrder
(TreeNode root, List<Integer> res)
Week 02/id_036/leetcode_94.java:48
Method
PrefixTree
Initialize your data structure here.
Week 06/id_306/PrefixTree.java:10
Method
Preorder
(Node root)
Week 02/id_546/LeetCode_589_546.cs:15
Method
PreorderTraversal
<summary> 方法一:递归法 </summary> <param name="root"></param> <returns></returns>
Week 02/id_546/LeetCode_144_546.cs:19
Method
PreorderTraversal2
<summary> 方法二:迭代法 </summary> <param name="root"></param> <returns></returns>
Week 02/id_546/LeetCode_144_546.cs:44
Method
Put
(key int, value int)
Week 07/id_011/lru-cache.go:60
Method
Put
(key int, value int)
Week 07/id_451/LeetCode_146_451.go:28
Method
Put
(key int, value int)
Week 07/id_631/LeetCode_146_631.go:47
Method
Put
(key int,value int )
Week 07/id_071/LeetCode_146_071.go:51
Method
RemoveDuplicates
(int[] nums)
Week 01/id_701/leetcode_26_701.cs:3
Method
RemoveDuplicates
<summary> 双指针法,第一个指针j指向最后一个不重复的值,另外一个指针i遍历数组, 开始的时候,j指向0,i指向j + 1也就是1。 i从1开始遍历数组,当i指向的值和j指向的值相等,就继续向前遍历, 当i指向的值和j指向的值不相等,让j先往前近一格(因为当前j指向的是最后一个不重复的值,此
Week 01/id_171/RemoveDuplicatesFromSortedArraySol.cs:20
Method
RobotSim
(int[] commands, int[][] obstacles)
Week 03/id_546/LeetCode_874_546.cs:14
Method
Rotate
(int[] nums, int k)
Week 01/id_171/RotateArraySol.cs:12
Function
RotateOne
** 向右移动数组解法1 解法思想 : 当一个数组长度为n,移动后k次,当k<n的时候很好理解,当k>=n的时候,其实本质上是移动了k对n求余次数 */
Week 01/id_301/main.go:52
Method
RotateOne
<summary> 第一种方法,使用额外的数组 </summary> <param name="nums"></param> <param name="k"></param>
Week 01/id_171/RotateArraySol.cs:53
Function
RotateThree
** 向右移动数组解法三 三次反转法 */
Week 01/id_301/main.go:98
Method
RotateTwo
<summary> 循环交换 </summary> <param name="nums"></param> <param name="k"></param>
Week 01/id_171/RotateArraySol.cs:23
Method
Run
()
Week 07/id_546/LeetCode_242_546.cs:63
Method
Run
()
Week 02/id_546/LeetCode_49_546.cs:37
Method
Run
()
Week 02/id_546/LeetCode_242_546.cs:63
Method
Search
(word string)
Week 06/id_011/implement-trie-prefix-tree.go:24
Method
Search
** Returns if the word is in the trie. */
Week 06/id_261/leetcode_208_261.go:32
Method
Search
(word string)
Week 06/id_301/LeetCode_208_301.go:39
Method
Search
** Returns if the word is in the trie. */
Week 06/id_631/LeetCode_208_631.go:45
Method
Search
(String word)
Week 06/id_546/LeetCode_208_546.cs:50
Method
Search
Returns if the word is in the trie. */
Week 06/id_171/ImplementTriePrefixTreeSol.cs:38
Method
Search
** Returns if the word is in the trie. */
Week 06/id_071/LeetCode_208_071.go:35
Method
Search
(int[] nums, int target)
Week 03/id_701/LeetCode_033_701.cs:3
Method
Search
(int[] nums, int target)
Week 03/id_546/LeetCode_33_546.cs:16
Method
Search
<summary> 二分查找。 当左半边是有序时并且target不在左半边范围内的,向右走。 当左半边是无序的并且target大于mid并且target小于索引0的位置,向右走。 否则就是向左走。 </summary> <param name="nums"></param> <param name=
Week 03/id_171/SearchInRotatedSortedArraySol.cs:19
Method
SearchMatrix
<summary> 二分法 </summary> <param name="matrix"></param> <param name="target"></param> <returns></returns>
Week 03/id_171/SearchA2dMatrixSol.cs:16
Method
SmallHeap
(int capacity)
Week 02/id_021/algorithm/src/main/java/com/lqw/algorithm/binaryheap/SmallHeap.java:25
Function
Solution
(arr)
Week 01/id_441/most_water.js:3
Method
Solution
(int[] nums)
Week 01/id_161/tow-sums.java:5
Method
Solution
()
Week 02/id_281/LeetCode_236_281.java:21
Method
Solution
()
Week 02/id_156/236_java.java:4
Method
Solution
()
Week 02/id_296/LeetCode_236_296.java:21
Method
Solve
(int row, int ld, int rd)
Week 07/id_546/LeetCode_52_546.cs:16
Method
SolveNQueens
(int n)
Week 06/id_546/LeetCode_51_546.cs:20
Method
SortValid
<summary> 先排序再比较,因为有两个排序,时间复杂度是O(2logn),也就是O(logn) </summary> <param name="s"></param> <param name="t"></param> <returns></returns>
Week 02/id_171/ValidAnagramSol.cs:125
Method
StartsWith
(prefix string)
Week 06/id_011/implement-trie-prefix-tree.go:35
Method
StartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_261/leetcode_208_261.go:49
Method
StartsWith
(prefix string)
Week 06/id_301/LeetCode_208_301.go:55
Method
StartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_631/LeetCode_208_631.go:69
Method
StartsWith
(String prefix)
Week 06/id_546/LeetCode_208_546.cs:62
Method
StartsWith
Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_171/ImplementTriePrefixTreeSol.cs:59
Method
StartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_071/LeetCode_208_071.go:49
Method
State
(int[][] stateBoard, int taken, int zeroSetX, int zeroSetY)
Week 06/id_306/SlidingPuzzle.java:59
Method
State
(int i, int j)
Week 06/id_306/ShortestPathBinaryMatrixOther.java:15
Method
State
(int i, int j)
Week 06/id_641/lesson14/LeetCode_1091_641.java:113
Function
TestBFindBreakPoint
(t *testing.T)
Week 03/id_531/leetCode_33_531_test.go:5
Function
TestFindMin
(t *testing.T)
Week 03/id_071/week03_test.go:21
Function
TestInsertFront
(t *testing.T)
Week 01/id_071/week01_test.go:48
Function
TestIsAnagram
(t *testing.T)
Week 02/id_071/week02_test.go:5
Function
TestIsPerfectSquare
(t *testing.T)
Week 03/id_071/week03_test.go:10
Function
TestLemonadeChange
(t *testing.T)
Week 03/id_071/week03_test.go:27
Function
TestMajorityElement
(t *testing.T)
Week 02/id_071/week02_test.go:21
Function
TestMaxArea
(t *testing.T)
Week 01/id_071/week01_test.go:17
Function
TestMaxProfit
(t *testing.T)
Week 03/id_071/week03_test.go:33
Function
TestMoveZero
(t *testing.T)
Week 01/id_071/week01_test.go:8
Function
TestMoveZeros2
(t *testing.T)
Week 01/id_531/LeetCode_283_531_test.go:35
Function
TestMySqrt
(t *testing.T)
Week 03/id_071/week03_test.go:5
Function
TestRotate
(t *testing.T)
Week 01/id_071/week01_test.go:42
Function
TestSearch
(t *testing.T)
Week 03/id_071/week03_test.go:15
Function
TestThreeSum
(t *testing.T)
Week 01/id_071/week01_test.go:24
Function
TestTrap
(t *testing.T)
Week 01/id_071/week01_test.go:61
Function
TestTwoSum
(t *testing.T)
Week 01/id_071/week01_test.go:31
Function
TestTwoSum
(t *testing.T)
Week 02/id_071/week02_test.go:13
Function
Test_moveZeros
(t *testing.T)
Week 01/id_531/LeetCode_283_531_test.go:8
Function
Test_remove
(t *testing.T)
Week 01/id_531/LeetCode_26_531_test.go:5
Method
ThreeSum
(int[] nums)
Week 01/id_171/ThreeNumSol.cs:14
Method
ThreeSumOne
<summary> 暴力破解,三层循环嵌套,时间复杂度是O(n³),空间复杂度是O(1),没有消耗额外空间 </summary> <param name="nums"></param> <returns></returns>
Week 01/id_171/ThreeNumSol.cs:70
Method
TotalNQueens
(int n)
Week 07/id_546/LeetCode_52_546.cs:31
Method
TreeNode
()
Week 06/id_081/Tire.java:46
Method
TreeNode
()
Week 06/id_611/LeetCode_208_611.java:49
Method
TreeNode
()
Week 06/id_611/LeetCode_212_611.java:68
Method
TreeNode
(int x)
Week 03/id_076/LeetCode_102_076.java:90
Method
TreeNode
(int x)
Week 03/id_431/LeetCode_102_431.java:63
Method
TreeNode
(int x)
Week 03/id_431/LeetCode_515_431.java:66
Method
TreeNode
(int val)
Week 03/id_511/LeetCode_102_511.java:18
Method
TreeNode
(int val)
Week 03/id_371/Leetcode_515_371.java:15
Method
TreeNode
(int val)
Week 03/id_371/Leetcode_102_371.java:19
Method
TreeNode
(int val, TreeNode left, TreeNode right)
Week 03/id_716/LeetCode_515_716.java:57
Method
TreeNode
(int val)
Week 03/id_716/LeetCode_107_716.java:62
Method
TreeNode
(int val)
Week 03/id_716/LeetCode_102_716.java:71
← previous
next →
2,101–2,200 of 6,280, ranked by callers