I am trying to implement a best first search which takes in input of points(x,y) from a test.txt file. After its traversal it should output the same points/vertices in order(for my test file example), but its giving me a different output for instance if the "test.txt" file contains: (0,1),(0,2),(1,2),(1,3), but what I am getting is: (0,1),(0,2),(0,2),(1,3). This what I have so far:
I am also suppose to compute the distance between the points, but I am not sure how to add it to the greedy best first search. Any help would be appreciated.