A while ago i post a thread about greedy function.
So let's say there's a symmetric matrix that represent the distant between each city. I am to write a function that connects the NEAREST (not the shortest path possible but the nearest) path. Well there's a problem, the problem is if i write a min search for each row, it will just goes from city A to city B back to city A. To solve that problem godpyro suggest me every time i finish a min search, i "pop" it off. That being said i assume is pop the city off. So if my first route is from city A to B, A will be pop off in the second row min search. M question is how to do that?
The thing is the way i store my data looks like this