Amazon Interview Question

Given Coordinates, return N closest points to origin.

Interview Answers

Anonymous

Jan 14, 2019

Can be done in O(|Coordinates|) time using a O(n) selection algorithm

Anonymous

Jan 19, 2019

Quickselect? Or median of medians?