Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 658. Find K Closest Elements
Given a sorted array, return the k integers closest to x (ties broken by smaller value) in ascending order. Use the sorted property to locate the optimal contiguous window of size k (e.g., via binary search on the window start or two-pointer shrinking).
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid July, 2025
Meta
Manager
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.