LeetCode 1471 The k Strongest Values in an Array | JSer - JavaScript & Algorithm
if (kth) then (quick select)
if (top k) then (priority queue)
well, before doing it, try use brute force , which is sort first
Here is my code: https://github.com/JSerZANP/leetCode_solutions/blob/main/1471-the-k-strongest-values-in-an-array.md
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.
Download
0 formats
No download links available.
LeetCode 1471 The k Strongest Values in an Array | JSer - JavaScript & Algorithm | NatokHD