We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Sorting
- Closest Numbers
- Discussions
Closest Numbers
Closest Numbers
Sort by
recency
|
627 Discussions
|
Please Login in order to post a comment
vector closestNumbers(vector arr) { int n=arr.size(); vectora; sort(arr.begin(),arr.end()); int k; for(int i=0;id; for(int i=0;i
My answer in Typescript, simple, noted