Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cartoonYu/LeetCodeSolution
/ functions
Functions
737 in github.com/cartoonYu/LeetCodeSolution
⨍
Functions
737
◇
Types & classes
424
Method
testRunningSum
Method: runningSum(int[] nums)
src/test/java/org/LeetcodeSolution/Array/Solution1480Test.java:49
Method
testSearch
()
src/test/java/org/LeetcodeSolution/BinarySearch/Solution33Test.java:51
Method
testSearchInsert
()
src/test/java/org/LeetcodeSolution/DynamicPlanning/Solution35Test.java:60
Method
testSearchMatrix
()
src/test/java/org/LeetcodeSolution/BinarySearch/Solution74Test.java:51
Method
testSearchRange
()
src/test/java/org/LeetcodeSolution/BinarySearch/Solution34Test.java:51
Method
testShortestCompletingWord
()
src/test/java/org/LeetcodeSolution/String/Solution748Test.java:71
Method
testSimplifiedFractions
Method: simplifiedFractions(int n)
src/test/java/org/LeetcodeSolution/Math/Solution1447Test.java:59
Method
testSingleNonDuplicate
()
src/test/java/org/LeetcodeSolution/BinarySearch/Solution540Test.java:36
Method
testSmallerNumbersThanCurrent
()
src/test/java/org/LeetcodeSolution/Array/Solution1365Test.java:39
Method
testSortArrayByParityIIWithAuxiliaryArray
()
src/test/java/org/LeetcodeSolution/Array/Solution922Test.java:39
Method
testSortArrayByParityIIWithTwoPointer
()
src/test/java/org/LeetcodeSolution/Array/Solution922Test.java:32
Method
testSubsets
Method: subsets(int[] nums)
src/test/java/org/LeetcodeSolution/BackTracking/Solution78Test.java:49
Method
testSubsetsWithDup
Method: subsetsWithDup(int[] nums)
src/test/java/org/LeetcodeSolution/BackTracking/Solution90Test.java:47
Method
testSumRange
Method: sumRange(int i, int j)
src/test/java/org/LeetcodeSolution/DynamicPlanning/Solution303Test.java:59
Method
testSumZero
Method: sumZero(int n)
src/test/java/org/LeetcodeSolution/Array/Solution1304Test.java:49
Method
testSummaryRanges
Method: summaryRanges(int[] nums)
src/test/java/org/LeetcodeSolution/Array/Solution228Test.java:40
Method
testSwapPairs
Method: swapPairs(ListNode head)
src/test/java/org/LeetcodeSolution/LinkedList/Solution24Test.java:56
Method
testThirdMax
Method: thirdMax(int[] nums)
src/test/java/org/LeetcodeSolution/Array/Solution414Test.java:49
Method
testThreeConsecutiveOdds
Method: threeConsecutiveOdds(int[] arr)
src/test/java/org/LeetcodeSolution/Array/Solution1550Test.java:43
Method
testThreeSum
Method: threeSum(int[] nums)
src/test/java/org/LeetcodeSolution/Array/Solution15Test.java:43
Method
testTopKFrequent
Method: topKFrequent(int[] nums, int k)
src/test/java/org/LeetcodeSolution/Array/Solution347Test.java:50
Method
testTranspose
()
src/test/java/org/LeetcodeSolution/Array/Solution867Test.java:40
Method
testTrap
Method: trap(int[] height)
src/test/java/org/LeetcodeSolution/Array/Solution42Test.java:37
Method
testTribonacci
Method: tribonacci(int n)
src/test/java/org/LeetcodeSolution/BackTracking/Solution1137Test.java:45
Method
testTwoSum1
Method: twoSum1(int[] nums, int target)
src/test/java/org/LeetcodeSolution/Array/Solution1Test.java:53
Method
testTwoSum2
Method: twoSum2(int[] nums, int target)
src/test/java/org/LeetcodeSolution/Array/Solution1Test.java:41
Method
testUniqueOccurrencesByCountInSort
Method: uniqueOccurrencesByCountinSort(int[] arr)
src/test/java/org/LeetcodeSolution/Array/Solution1207Test.java:68
Method
testUniqueOccurrencesByHash
Method: uniqueOccurrencesByHash(int[] arr)
src/test/java/org/LeetcodeSolution/Array/Solution1207Test.java:49
Method
testUniquePaths
Method: uniquePaths(int m, int n)
src/test/java/org/LeetcodeSolution/DynamicPlanning/Solution62Test.java:69
Method
testUniquePathsWithObstacles
Method: uniquePathsWithObstacles(int[][] obstacleGrid)
src/test/java/org/LeetcodeSolution/DynamicPlanning/Solution63Test.java:45
Method
testWordPattern
Method: wordPattern(String pattern, String str)
src/test/java/org/LeetcodeSolution/String/Solution290Test.java:68
Method
top
()
src/main/java/org/LeetcodeSolution/Stack/Solution155.java:77
Method
trailingZeroes
1.关于复杂度 1.1 时间复杂度为O(n) 1.2 空间负责度为O(1) 2.我的解题思路 2.1 因为0只可能是2跟5相乘得到的结果,而2出现的次数会比5多得多,所以我们只需要统计5因子出现的次数就可以得到0的次数 3.提交记录 3.1 力扣中耗时1ms,消耗33.6MB内存
src/main/java/org/LeetcodeSolution/Math/Solution172.java:41
Method
twoSum
1.关于复杂度 1.1 时间复杂度为O(n) 1.2 空间负责度为O(1) 2.我的解题思路 2.1 解法的主要思想:双指针遍历数组 2.2 定义左右指针分别从开头及结尾遍历 2.3 循环直到左指针>右指针找到array[i]+array[j]=target
src/main/java/org/LeetcodeSolution/Tree/Solution167.java:53
Method
uncommonFromSentences
1.关于复杂度 1.1 时间复杂度为O(n) 1.2 空间负责度为O(n) 2.我的解题思路 2.1 利用split函数将两个传入字符串转换成String数组 2.2 定义一个HashMap记录单词出现次数 2.3 循环遍历2.1的两个数组,记录单词出现次数
src/main/java/org/LeetcodeSolution/Tree/Solution884.java:49
Method
xorOperation
1.关于复杂度 1.1 时间复杂度为 O(n) 1.2 空间负责度为 O(1) 2.我的解题思路 2.1 遍历数组,对每个元素做异或操作 3.提交记录 3.1 力扣中耗时 0ms,消耗 35.5MB 内存 3.2 leetcode 中耗时 0ms,消耗 35.6MB 内存 4.Q
src/main/java/org/LeetcodeSolution/Math/Solution1486.java:39
Method
zigzagLevelOrder
1.关于复杂度 1.1 时间复杂度为O(log n^2) 1.2 空间负责度为O(log n) 2.我的解题思路 2.1 定义一个队列缓存每层的节点 2.2 循环遍历树直到队列不为空 2.2.1 定义一个变量记录当前队列的长度 2.
src/main/java/org/LeetcodeSolution/Tree/Solution103.java:55
← previous
701–737 of 737, ranked by callers