Amazon Interview Question

Find n closest points to a particular point. Also, optimize the solution until you get an optimal solution.