From b87c1d3c3510d973ca9cc86246a322b6d63be6ac Mon Sep 17 00:00:00 2001 From: Manuel Pineda Date: Sat, 16 Jan 2021 18:01:29 +0100 Subject: [PATCH] [LeetCode] Add January 16. --- solved/LeetCode/Challenges/2020/January/16.kt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 solved/LeetCode/Challenges/2020/January/16.kt diff --git a/solved/LeetCode/Challenges/2020/January/16.kt b/solved/LeetCode/Challenges/2020/January/16.kt new file mode 100644 index 00000000..0636a338 --- /dev/null +++ b/solved/LeetCode/Challenges/2020/January/16.kt @@ -0,0 +1,6 @@ +class Solution { + fun findKthLargest(nums: IntArray, k: Int): Int { + val sorted = nums.sorted().reversed() + return sorted[k-1] + } +}