What is the time complexity of the following algorithm?
Input: set of points P and their Euclidean coordinates
Compute a tour of the points (using the nearest neighbour algorithm, like in the TSP problem)
For each point, get the nearest neighbour info (with respect to all points in the original data set)
Is the complexity O(n) or O(n²)? How can we easily visualize complexity and efficiency?