Indexed Priority Queue (C# / Unity)

A Generic priority Queue with random access to its elements. I’ve used this frequently for A* pathfinding implementations, since it works well as a data structure for the “open list”. It allows for finding the next best visit-able node with the ease-of-use of typical priority queues, yet provides random access to update estimations at specific indexes.

Check out the Indexed Priority Queue from my open-source Unity utility library, Atlas, here. You can also see it in context in the A* implementation from Atlas, here.