Problem 45427. King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination.
https://en.wikipedia.org/wiki/Chess#Movement
For simplicity, numerical notation is used to represent the positions.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers54
Suggested Problems
-
Find common elements in matrix rows
2712 Solvers
-
Make a run-length companion vector
655 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13504 Solvers
-
Magic is simple (for beginners)
11039 Solvers
-
835 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!