Skip to content

Commit f470e9f

Browse files
committed
Runtime: 127 ms (Top 17.65%) | Memory: 13.9 MB (Top 92.19%)
1 parent 8423a10 commit f470e9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# Runtime: 127 ms (Top 17.65%) | Memory: 13.9 MB (Top 92.19%)
12
class Solution:
23
def largestSumAfterKNegations(self, nums: List[int], k: int) -> int:
34
for i in range(k):
45
x = min(nums)
56
y = nums.index(x)
67
nums[y] = -1*x
7-
return sum(nums)
8+
return sum(nums)

0 commit comments

Comments
 (0)