Which class of algorithms does this problem belong to?

Which class of algorithms would this sort of a problem belong to? If I had to pick up a book on algorithms, which topic should I be looking at to find more problems of this nature and their explanation?

Given the current location on of the horse (or whatever the thing is that moves two spaces horizontally and one vertically) on a chess board, say, (x1, y1), how many steps would you need to move it to reach a destination location (x2, y2)?


This would be a pathfinding algorithm which would be part of graph theory.

Example algorithms include A* and Dijkstra’s algorithm.

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *