MCPcopy Create free account

hub / github.com/algorithm004-01/algorithm004-01 / functions

Functions6,280 in github.com/algorithm004-01/algorithm004-01

MethodNumIslands
(char[][] grid)
Week 03/id_546/LeetCode_200_546.cs:17
MethodNumber
Week 01/id_561/LeetCode_1_561.cpp:28
MethodPair
(String key, Integer val)
Week 03/id_216/Week03.java:13
MethodPair
(String word, int level)
Week 03/id_716/LeetCode_127_716.java:96
MethodPath
<summary> 第三种方法,遍历树,并且记录下遍历路径,当找到p或者q的任意一个时,将当前索引保存下, 继续遍历去寻找另外一个,并且保存遍历路径,如果遇到路径回退,并且回退到索引之后,索引自减, 直到找到另外一个之后,索引所处位置就是公共祖先位置。 </summary> <param name=
Week 02/id_171/LowestCommonAncestorOfABinaryTreeSol.cs:112
MethodPeakValley
<summary> 峰谷法,在谷买,在峰卖,减少购买次数 </summary> <param name="prices"></param> <returns></returns>
Week 03/id_171/BestTimeToBuyAndSellStockIISol.cs:21
MethodPermute
(int[] nums)
Week 02/id_546/LeetCode_46_546.cs:14
MethodPermuteUnique
(int[] nums)
Week 02/id_546/LeetCode_47_546.cs:16
MethodPlusOne
(int[] digits)
Week 01/id_171/PlusOneSol.cs:12
MethodPlusOneOne
(int[] digits)
Week 01/id_171/PlusOneSol.cs:34
MethodPoint
(int x, int y)
Week 06/id_346/LeetCode_130_346.java:55
MethodPoint
(int x, int y)
Week 03/id_306/NumIslands_bfs.java:14
MethodPoint
(int x, int y)
Week 03/id_306/NumIslands_dfs.java:11
FunctionPostOrderTraversal
PostOrderTraversal 二叉树后续遍历
Week 02/id_531/leetCode_145_531.go:4
MethodPostorder
(Node root)
Week 02/id_546/LeetCode_590_546.cs:27
MethodPreOrder
(TreeNode root, List<Integer> res)
Week 02/id_036/leetcode_94.java:48
MethodPrefixTree
Initialize your data structure here.
Week 06/id_306/PrefixTree.java:10
MethodPreorder
(Node root)
Week 02/id_546/LeetCode_589_546.cs:15
MethodPreorderTraversal
<summary> 方法一:递归法 </summary> <param name="root"></param> <returns></returns>
Week 02/id_546/LeetCode_144_546.cs:19
MethodPreorderTraversal2
<summary> 方法二:迭代法 </summary> <param name="root"></param> <returns></returns>
Week 02/id_546/LeetCode_144_546.cs:44
MethodPut
(key int, value int)
Week 07/id_011/lru-cache.go:60
MethodPut
(key int, value int)
Week 07/id_451/LeetCode_146_451.go:28
MethodPut
(key int, value int)
Week 07/id_631/LeetCode_146_631.go:47
MethodPut
(key int,value int )
Week 07/id_071/LeetCode_146_071.go:51
MethodRemoveDuplicates
(int[] nums)
Week 01/id_701/leetcode_26_701.cs:3
MethodRemoveDuplicates
<summary> 双指针法,第一个指针j指向最后一个不重复的值,另外一个指针i遍历数组, 开始的时候,j指向0,i指向j + 1也就是1。 i从1开始遍历数组,当i指向的值和j指向的值相等,就继续向前遍历, 当i指向的值和j指向的值不相等,让j先往前近一格(因为当前j指向的是最后一个不重复的值,此
Week 01/id_171/RemoveDuplicatesFromSortedArraySol.cs:20
MethodRobotSim
(int[] commands, int[][] obstacles)
Week 03/id_546/LeetCode_874_546.cs:14
MethodRotate
(int[] nums, int k)
Week 01/id_171/RotateArraySol.cs:12
FunctionRotateOne
** 向右移动数组解法1 解法思想 : 当一个数组长度为n,移动后k次,当k<n的时候很好理解,当k>=n的时候,其实本质上是移动了k对n求余次数 */
Week 01/id_301/main.go:52
MethodRotateOne
<summary> 第一种方法,使用额外的数组 </summary> <param name="nums"></param> <param name="k"></param>
Week 01/id_171/RotateArraySol.cs:53
FunctionRotateThree
** 向右移动数组解法三 三次反转法 */
Week 01/id_301/main.go:98
MethodRotateTwo
<summary> 循环交换 </summary> <param name="nums"></param> <param name="k"></param>
Week 01/id_171/RotateArraySol.cs:23
MethodRun
()
Week 07/id_546/LeetCode_242_546.cs:63
MethodRun
()
Week 02/id_546/LeetCode_49_546.cs:37
MethodRun
()
Week 02/id_546/LeetCode_242_546.cs:63
MethodSearch
(word string)
Week 06/id_011/implement-trie-prefix-tree.go:24
MethodSearch
** Returns if the word is in the trie. */
Week 06/id_261/leetcode_208_261.go:32
MethodSearch
(word string)
Week 06/id_301/LeetCode_208_301.go:39
MethodSearch
** Returns if the word is in the trie. */
Week 06/id_631/LeetCode_208_631.go:45
MethodSearch
(String word)
Week 06/id_546/LeetCode_208_546.cs:50
MethodSearch
Returns if the word is in the trie. */
Week 06/id_171/ImplementTriePrefixTreeSol.cs:38
MethodSearch
** Returns if the word is in the trie. */
Week 06/id_071/LeetCode_208_071.go:35
MethodSearch
(int[] nums, int target)
Week 03/id_701/LeetCode_033_701.cs:3
MethodSearch
(int[] nums, int target)
Week 03/id_546/LeetCode_33_546.cs:16
MethodSearch
<summary> 二分查找。 当左半边是有序时并且target不在左半边范围内的,向右走。 当左半边是无序的并且target大于mid并且target小于索引0的位置,向右走。 否则就是向左走。 </summary> <param name="nums"></param> <param name=
Week 03/id_171/SearchInRotatedSortedArraySol.cs:19
MethodSearchMatrix
<summary> 二分法 </summary> <param name="matrix"></param> <param name="target"></param> <returns></returns>
Week 03/id_171/SearchA2dMatrixSol.cs:16
MethodSmallHeap
(int capacity)
Week 02/id_021/algorithm/src/main/java/com/lqw/algorithm/binaryheap/SmallHeap.java:25
FunctionSolution
(arr)
Week 01/id_441/most_water.js:3
MethodSolution
(int[] nums)
Week 01/id_161/tow-sums.java:5
MethodSolution
()
Week 02/id_281/LeetCode_236_281.java:21
MethodSolution
()
Week 02/id_156/236_java.java:4
MethodSolution
()
Week 02/id_296/LeetCode_236_296.java:21
MethodSolve
(int row, int ld, int rd)
Week 07/id_546/LeetCode_52_546.cs:16
MethodSolveNQueens
(int n)
Week 06/id_546/LeetCode_51_546.cs:20
MethodSortValid
<summary> 先排序再比较,因为有两个排序,时间复杂度是O(2logn),也就是O(logn) </summary> <param name="s"></param> <param name="t"></param> <returns></returns>
Week 02/id_171/ValidAnagramSol.cs:125
MethodStartsWith
(prefix string)
Week 06/id_011/implement-trie-prefix-tree.go:35
MethodStartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_261/leetcode_208_261.go:49
MethodStartsWith
(prefix string)
Week 06/id_301/LeetCode_208_301.go:55
MethodStartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_631/LeetCode_208_631.go:69
MethodStartsWith
(String prefix)
Week 06/id_546/LeetCode_208_546.cs:62
MethodStartsWith
Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_171/ImplementTriePrefixTreeSol.cs:59
MethodStartsWith
** Returns if there is any word in the trie that starts with the given prefix. */
Week 06/id_071/LeetCode_208_071.go:49
MethodState
(int[][] stateBoard, int taken, int zeroSetX, int zeroSetY)
Week 06/id_306/SlidingPuzzle.java:59
MethodState
(int i, int j)
Week 06/id_306/ShortestPathBinaryMatrixOther.java:15
MethodState
(int i, int j)
Week 06/id_641/lesson14/LeetCode_1091_641.java:113
FunctionTestBFindBreakPoint
(t *testing.T)
Week 03/id_531/leetCode_33_531_test.go:5
FunctionTestFindMin
(t *testing.T)
Week 03/id_071/week03_test.go:21
FunctionTestInsertFront
(t *testing.T)
Week 01/id_071/week01_test.go:48
FunctionTestIsAnagram
(t *testing.T)
Week 02/id_071/week02_test.go:5
FunctionTestIsPerfectSquare
(t *testing.T)
Week 03/id_071/week03_test.go:10
FunctionTestLemonadeChange
(t *testing.T)
Week 03/id_071/week03_test.go:27
FunctionTestMajorityElement
(t *testing.T)
Week 02/id_071/week02_test.go:21
FunctionTestMaxArea
(t *testing.T)
Week 01/id_071/week01_test.go:17
FunctionTestMaxProfit
(t *testing.T)
Week 03/id_071/week03_test.go:33
FunctionTestMoveZero
(t *testing.T)
Week 01/id_071/week01_test.go:8
FunctionTestMoveZeros2
(t *testing.T)
Week 01/id_531/LeetCode_283_531_test.go:35
FunctionTestMySqrt
(t *testing.T)
Week 03/id_071/week03_test.go:5
FunctionTestRotate
(t *testing.T)
Week 01/id_071/week01_test.go:42
FunctionTestSearch
(t *testing.T)
Week 03/id_071/week03_test.go:15
FunctionTestThreeSum
(t *testing.T)
Week 01/id_071/week01_test.go:24
FunctionTestTrap
(t *testing.T)
Week 01/id_071/week01_test.go:61
FunctionTestTwoSum
(t *testing.T)
Week 01/id_071/week01_test.go:31
FunctionTestTwoSum
(t *testing.T)
Week 02/id_071/week02_test.go:13
FunctionTest_moveZeros
(t *testing.T)
Week 01/id_531/LeetCode_283_531_test.go:8
FunctionTest_remove
(t *testing.T)
Week 01/id_531/LeetCode_26_531_test.go:5
MethodThreeSum
(int[] nums)
Week 01/id_171/ThreeNumSol.cs:14
MethodThreeSumOne
<summary> 暴力破解,三层循环嵌套,时间复杂度是O(n³),空间复杂度是O(1),没有消耗额外空间 </summary> <param name="nums"></param> <returns></returns>
Week 01/id_171/ThreeNumSol.cs:70
MethodTotalNQueens
(int n)
Week 07/id_546/LeetCode_52_546.cs:31
MethodTreeNode
()
Week 06/id_081/Tire.java:46
MethodTreeNode
()
Week 06/id_611/LeetCode_208_611.java:49
MethodTreeNode
()
Week 06/id_611/LeetCode_212_611.java:68
MethodTreeNode
(int x)
Week 03/id_076/LeetCode_102_076.java:90
MethodTreeNode
(int x)
Week 03/id_431/LeetCode_102_431.java:63
MethodTreeNode
(int x)
Week 03/id_431/LeetCode_515_431.java:66
MethodTreeNode
(int val)
Week 03/id_511/LeetCode_102_511.java:18
MethodTreeNode
(int val)
Week 03/id_371/Leetcode_515_371.java:15
MethodTreeNode
(int val)
Week 03/id_371/Leetcode_102_371.java:19
MethodTreeNode
(int val, TreeNode left, TreeNode right)
Week 03/id_716/LeetCode_515_716.java:57
MethodTreeNode
(int val)
Week 03/id_716/LeetCode_107_716.java:62
MethodTreeNode
(int val)
Week 03/id_716/LeetCode_102_716.java:71
← previousnext →2,101–2,200 of 6,280, ranked by callers