Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1471. The k Strongest Values in an Array
Find the centre (the element at index (n−1)/2 of the sorted array) and return any k elements with the largest "strength", where strength = |x − centre| and ties are broken by the larger value — i.e., pick the top-k elements by distance from the centre.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.