Expand description
§Wizard Simulator 20XX
Dijkstra’s algorithm is ideal for solving this problem. A node in the graph is our current state and each edge is represented by casting a spell to get to a new state.
The key to optimizing is to cache previously seen states. As we receive states in strictly increasing order of mana spent if we see a state again then it cannot possibly be optimal and we can discard.
Structs§
- State 🔒
Functions§
Type Aliases§
- Input 🔒