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 阅读次数:159
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-演练-英雄的编辑
MongoDB中有三个常用的更新方法 save() / update() / findAndmodify()
leetcode-1
线性表,数据排成像线一样的数据结构,数据只有前后俩个方向,数组,链表,队列,栈都是线性表
Java学习之查找元素在数组中出现的索引位置【应用】
Java学习StringBuilder之字符串拼接升级版案例【应用】
给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。
【Python基础知识】
给定一个数组,将数组中的元素向右移动 k 个位置,其中 k 是非负数。
给定一个二进制数组, 计算其中最大连续1的个数。
编写一个函数,其作用是将输入的字符串反转过来。输入字符串以字符数组 char[] 的形式给出。
文章
22507
阅读量
2174424
2024-06-26 06:22:55
2024-06-26 06:22:45
2024-06-26 06:20:12
2024-06-26 06:20:01
2024-06-25 08:05:47
2024-06-24 08:38:15
2023-04-13 09:36:44
2023-06-08 06:23:00
2023-02-24 09:13:25
2023-04-17 09:39:09
2023-04-18 14:14:25
2023-02-22 06:11:15