class Solution:
def findKthLargest(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: int
"""
sortNum = sorted(nums, reverse=True)
return sortNum[k - 1]
2023-04-07 06:48:34 阅读次数:359
class Solution:
def findKthLargest(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: int
"""
sortNum = sorted(nums, reverse=True)
return sortNum[k - 1]
上一篇:django-演练-英雄的编辑
LeetCode:239. 滑动窗口最大值
LeetCode:344.反转字符串
当一个数组中大部分元素为0,或者为同一个值的数组时,可以使用稀疏数组来保存该数组。
算法题 62. 不同路径,66. 加一,67. 二进制求和
Leetcode:242.有效的字母异位词
LeetCode 209 长度最小的子数组(滑动窗口)
LeetCode:977.有序数组的平方
Leetcode:1.两数之和
Leetcode27. 移除元素
数组是一组相同类型元素的集合。
文章
29774
阅读量
4166363
2025-02-19 09:04:22
2025-02-19 09:03:26
2025-02-19 09:03:26
2025-02-19 09:03:09
2025-02-19 09:02:07
2025-02-19 09:02:07
2023-06-08 06:23:00
2023-04-13 09:36:44
2023-02-24 09:13:25
2023-04-17 09:39:09
2023-04-18 14:14:25
2023-02-22 06:11:15