Hi,

I'm not sure what data structure I should use, but here is my situation. I'm implementing a path finding algorithm on a 2d grid map (saved as a 2d array). When I expand from one node to another, I have to save the nodes expanded to, but not yet explored (for their cost function). I therefore need a data structure which is cable of saving such nodes (open list), and when the node has been explored and deemed costly, to discard of it (to a closed list).

From my limited understanding of how linked lists work, I am thinking that it may be an acceptable choice. What are my other options? I would very much appreciate some pseudo code to help aid my understanding.

Thank you.