Question about time-complexity for MST-like algorithm I have got a problem with an excercise about graphs:

Your friend has been hired by a brewery to work out the most efficient
delivery route for the beer-delivery truck drivers. A typical delivery has about 50 stops and the company wants to save money by driving the
shortest possible distance. Your friend ignores your advice and decides on an algorithm, as follows:


Start at the depot, 
Go to the nearest location that has not yet been
delivered to:


Deliver
Repeat until you have delivered all the beer

Return to depot


And the quesiton is:
What is the Big-O complexity of this approach? Why?

I do not think this way of solving problem is any algorithm like Prim's algorithm, and I have no clue what can be a complexity. Could anyone explain me?
This problem looks variant of TSP problem(more precisely metric TSP). As you want to traverse all node with the minimum distance.

TSP is one of the classical NP-Hard problem.

What your friend did is a Greedy approach making minimum Spanning tree Which is 2-Approx(metric-TSP) of the minimum distance.

This greedy approach generally works in E log V time but does not have guarantee for exact solution.

By using graph structure we can implement in linear time also.