Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algorithm006-class02/algorithm006-class02
/ functions
Functions
5,772 in github.com/algorithm006-class02/algorithm006-class02
⨍
Functions
5,772
◇
Types & classes
2,815
Method
minimumTotal
(List<List<Integer>> triangle)
Week_05/G20200343030536/LeetCode_120_536.java:11
Method
minimumTotal
(List<List<Integer>> triangle)
Week_05/G20200343030600/LeetCode_120_600.java:8
Method
minimumTotal
Week_05/G20200343030462/leetcode-120-462.cpp:3
Method
minimumTotal2
(List<List<Integer>> triangle)
Week_05/G20200343030022/LeetCode_120_022.java:42
Method
minimumTotal3
(List<List<Integer>> triangle)
Week_05/G20200343030022/LeetCode_120_022.java:53
Method
minimumTotal_v1
(self, triangle: List[List[int]])
Week_05/G20200343030632/Leetcode_120_632.py:6
Method
move
Week_03/G20200343030428/LeetCode_874_428.cpp:39
Function
moveZeroes
Week_01/G20200343030450/Leetcode-283-450.c:1
Function
moveZeroes
Week_01/G20200343030450/450-Week-01-283.c:1
Function
moveZeroes
leetcode submit region begin(Prohibit modification and deletion)
Week_01/G20200343030008/LeetCode_283_008.go:72
Function
moveZeroes
Week_01/G20200343030420/LeetCode_283_420.c:1
Function
moveZeroes
(nums)
Week_01/G20200447010070/LeetCode_283_070.js:12
Function
moveZeroes
(nums)
Week_01/G20200343030430/LeetCode_283_430.js:5
Function
moveZeroes
(nums)
Week_01/G20200343030550/LeetCode_283_550.py:2
Function
moveZeroes
(nums)
Week_01/G20200343030380/Leetcode-283-380.js:8
Function
moveZeroes
(nums []int)
Week_01/G20200343030396/LeetCode_283_396.go:3
Method
moveZeroes
(self, nums: List[int])
Week_00/G20200343030400/LeetCode_283_400.py:4
Method
moveZeroes
Week_00/G20200343030400/LeetCode_283_400.cpp:5
Method
moveZeroes
:type nums: List[int] :rtype: None Do not return anything, modify nums in-place instead.
Week_00/G20200343030488/283.移动零.py:9
Method
moveZeroes
Week_00/G20200343030636/LeetCode_283_636.cpp:35
Method
moveZeroes
(int[] nums)
Week_01/G20200343030448/LeetCode_283_448.java:4
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030528/[283]Move Zeroes.py:20
Method
moveZeroes
Week_01/G20200343030400/LeetCode_283_400.cpp:6
Method
moveZeroes
Week_01/G20200343030428/LeetCode_283_428.cpp:28
Method
moveZeroes
:type nums: List[int] :rtype: None Do not return anything, modify nums in-place instead.
Week_01/G20200343030488/283.移动零.py:9
Method
moveZeroes
(self, nums: List[int])
Week_01/G20200389010036/LeetCode_283_036.py:4
Method
moveZeroes
(int[] nums)
Week_01/G20200343030518/LeetCode_283_518.java:2
Method
moveZeroes
two 进行交换 非零与零进行交换,只有当nums[j] != 0的时候 和i!= j的时候交换 @param nums
Week_01/G20200343030490/LeetCode_283_490.java:27
Method
moveZeroes
(int[] nums)
Week_01/G20200343030436/283.移动零.java:9
Method
moveZeroes
(int[] nums)
Week_01/G20200343030022/LeetCode_283_022.java:8
Method
moveZeroes
(int[] nums)
Week_01/G20190343020006/MoveZeroes.java:14
Method
moveZeroes
(int[] nums)
Week_01/G20200343030584/LeetCode_283_584.java:23
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030412/LeetCode_283_412.py:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030632/Leetcode_283_632.java:3
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030632/Leetcode_283_632.py:9
Method
moveZeroes
(int[] nums)
Week_01/G20200343030580/LeetCode_283_580.java:2
Method
moveZeroes
Week 01 LeetCode 283 283.移动零
Week_01/G20200343030376/LeetCode_263_376.java:7
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030438/LeetCode_283_438.py:2
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030410/LeetCode_283_410.py:9
Method
moveZeroes
解法一:遍历数组,遇到0即删除,同时计数,最后再尾部添加对应个数的0。使用vector的删除功能。数组的删除 需要移动元素,所以效率不高;在尾部增加的性能较好。时间复杂度 O(n^2) 16ms 62.11 % */
Week_01/G20200343030636/LeetCode_283_636.cpp:39
Method
moveZeroes
整体思路:把非零的移动到数组前面,最后在数组后面补上0。时间复杂度:O(N),空间复杂度:O(1)
Week_01/G20200343030492/LeetCode_283_492.java:7
Method
moveZeroes
(int[] nums)
Week_01/G20200343030522/LeetCode_283_522.java:19
Method
moveZeroes
Week_01/G20200343030614/LeetCode_283_614.cpp:3
Method
moveZeroes
(int[] nums)
Week_01/G20200343030456/LeetCode_283_456.java:3
Method
moveZeroes
(int[] nums)
Week_01/G20200343030460/LeetCode_283_460.java:19
Method
moveZeroes
(int[] nums)
Week_01/G20200343030536/LeetCode_283_536.java:8
Method
moveZeroes
Week_01/G20200343030508/LeetCode_283_508.cpp:35
Method
moveZeroes
(int[] nums)
Week_01/G20200343030600/LeetCode_283_600.java:8
Method
moveZeroes
:type nums: List[int] :rtype: None Do not return anything, modify nums in-place instead.
Week_01/G20200343030556/283.移动零.py:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030402/MoveZeroes.java:21
Method
moveZeroes
(int [] nums)
Week_01/G20200343030628/MoveZeroes.java:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030368/LeetCode_283_368.java:2
Method
moveZeroes
时间复杂度是O(n)
Week_01/G20200343030462/LeetCode_283_462.cpp:5
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030362/LeetCode_283_362.py:2
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030620/LeetCode_283_620.py:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030422/LeetCode_283_422.java:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030386/LeetCode_283_386.java:7
Method
moveZeroes
(int[] nums)
Week_01/G20200343030532/LeetCode_283_532.java:21
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030588/leetcode-283-0588.py:4
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030638/LeetCode_283(1)_638.py:2
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030638/LeetCode_283(3)_638.py:2
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030638/LeetCode_283(2)_638.py:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030378/LeetCode_283_378.java:2
Method
moveZeroes
(int[] nums)
Week_01/G20200343030548/LeetCode_283_548.java:9
Method
moveZeroes
(int[] nums)
Week_01/G20200343030006/MoveZeroes.java:14
Method
moveZeroes
Do not return anything, modify nums in-place instead.
Week_01/G20200343030610/LeetCode_283_610.py:2
Method
moveZeroes
(self, nums)
Week_01/G20200343030016/LeetCode_283_016.py:6
Method
moveZeroes
(int[] nums)
Week_01/G20200343030542/LeetCode_283_542.java:2
Method
moveZeroes
Week_01/G20200343030506/LeetCode_283_506 .cpp:3
Method
moveZeroes
* 解法一:先删除所有的0,然后在数组末尾增加相等数量的0 * @param Integer[] $nums * @return NULL */
Week_01/G20200343030032/LeetCode_283_032.php:27
Method
moveZeroes1
整体思路:老师课堂上说的双指针交换法。时间复杂度:O(N),空间复杂度:O(1)
Week_01/G20200343030492/LeetCode_283_492.java:22
Method
moveZeroes1
(int[] nums)
Week_01/G20200343030426/MoveZeroes283.java:18
Function
moveZeroes2
2. 双指针,快慢指针,慢指针指向非零,快指针遍历数组 时间复杂度 O(n), 空间复杂度O(1)
Week_01/G20200343030008/LeetCode_283_008.go:43
Method
moveZeroes2
(int[] nums)
Week_01/G20200343030584/LeetCode_283_584.java:42
Method
moveZeroes2
(int[] nums)
Week_01/G20200343030536/LeetCode_283_536.java:25
Method
moveZeroes2
(int[] nums)
Week_01/G20200343030426/MoveZeroes283.java:41
Method
moveZeroes2
* 解法二:先定义好非0元素的位置,然后将数组中的非0元素迭代更新到定义好的位置 * @param Integer[] $nums * @return NULL */
Week_01/G20200343030032/LeetCode_283_032.php:47
Function
moveZeroes3
最优解 3. 双指针,快慢指针之间的值为0,快指针指向非0值,和慢指针交换值 时间复杂度 O(n), 空间复杂度O(1) 比第二种方法好在,遇到最坏情况只要一动一次 [0,0,0,0,0,1]
Week_01/G20200343030008/LeetCode_283_008.go:61
Method
moveZeroes3
(int[] nums)
Week_01/G20200343030584/LeetCode_283_584.java:56
Method
moveZeroesMethod2
(int[] nums)
Week_01/G20200343030436/283.移动零.java:43
Method
moveZeroesOne
(int[] nums)
Week_00/G20200343030390/Leetcode_283_390.java:29
Method
moveZeroesOne
(int[] nums)
Week_01/G20200343030390/Leetcode_283_390.java:29
Method
moveZeroesThree
(int[] nums)
Week_00/G20200343030390/Leetcode_283_390.java:54
Method
moveZeroesThree
(int[] nums)
Week_01/G20200343030390/Leetcode_283_390.java:54
Method
moveZeroesTwo
(int[] nums)
Week_00/G20200343030390/Leetcode_283_390.java:42
Method
moveZeroesTwo
(int[] nums)
Week_01/G20200343030390/Leetcode_283_390.java:42
Function
move_zeroes
解法一、使用两个指针,按顺序移动所有非零元素到数组前部,从最后一个非零元素之后到数组末尾的元素设为0
Week_01/G20200343030416/LeetCode_283_416.rb:13
Function
move_zeroes1
解法二、删除原数组的所有的0,再在数组末尾添加
Week_01/G20200343030416/LeetCode_283_416.rb:28
Function
move_zeroes2
解法三、使用快慢指针,交换数组元素
Week_01/G20200343030416/LeetCode_283_416.rb:39
Function
myAtoi
Week_08/G20200343030420/LeetCode_8_420.c:3
Function
myAtoi
Week_08/G20200343030558/LeetCode-8-558.cpp:5
Function
myAtoi
(str)
Week_08/G20200343030430/LeetCode_8_430.js:5
Function
myAtoi
(str)
Week_08/G20200343030380/Leetcode-8-380.js:7
Function
myAtoi
(self, s: str)
Week_08/G20200343030362/LeetCode_8_362.py:5
Method
myAtoi
(self, str: str)
Week_08/G20200343030400/LeetCode_8_400.py:2
Method
myAtoi
Week_08/G20200343030428/LeetCode_8_428.cpp:10
Method
myAtoi
(String str)
Week_08/G20200343030436/8.字符串转换整数-atoi.java:9
Method
myAtoi
(String str)
Week_08/G20200343030580/LeetCode_8_580.java:2
Method
myAtoi
(String str)
Week_08/G20200343030404/LeetCode_8_404.java:2
Method
myAtoi
(String str)
Week_08/G20200343030522/LeetCode_8_522.java:65
← previous
next →
4,201–4,300 of 5,772, ranked by callers