Suppose you have a n x n gaming board and you have a character that can move like a knight on a chess board except he can't move up or left. And each block he moves to has a value which can be accumulated to his points. The player is trying to maximize points and reach T
I came up with a solution but im wondering where it could fail and its run time.
My idea was to create a directed weighted graph (points as weights) to each possible destination and run Dijkstra's algorithm on the graph, however instead of shortest path, we try and find the longest path.
I am guessing the run-time would be O (some thing + |E|+|V|log||V|)
Im not sure what something is.