Backstory: Find K closest points to center tutorial explains how to use PriorityQueue to solve the question. There are multiple ways to solve Find K closest points to center. This tutorial focuses on the solution using PriorityQueue in Java, because it is the easiest. Meanwhile, Euclidean distance in introduced to calculate distance.
Why I picked this question: This is the second tutorial of my trilogy of “shortest path”. I want to demonstrate the solution to provide multiple options rather than just one “best” or “shortest” solution.