I am currently trying to create a GPS system which can take in map data and find the shortest distance between the start point and the end point in the shortest distance.
The program takes in vertexes (which each contain a label as well as x and y coordinates) and edges (which detail to and from what roads as well as the distance) which are then stored in an adjacency list.
I have decided to use the A* algorithm and have attempted to follow this introduction but I am unsure of how to implement the open and closed lists. Would a simple vector suffice or would I need to use something else like a priority queue?
The open list here is used for getting the next best or shortest path, hence you could use a priority queue for that.
The closed list is just to discard the squares that you do not want to use further, you can implement the closed list using a hash table so that you can find whether this square is discarded or not in O(1).