LeetCode 1471 - The k Strongest Values in an Array

Опубликовано: 03 Май 2026
на канале: Mushu
294
2

LeetCode 1471 The k Strongest Values in an Array - Python Solution
I probably should add: If we can assume that all input arrays are already sorted, we would not need the sorted(arr) line. Then it would be O(k) time complexity.

Check out my clothing brand, UI Tees, here! https://www.uishirts.com/
Or you can go to my channel Store! https://www.youtube.com/@Mushu909/store
Come back often, because more cool styles are coming soon! Proceeds help support this channel!

Link to problem: https://leetcode.com/problems/the-k-s...
Link to code: https://github.com/mcxu/code-sandbox/...