Manhattan Distance
This was a coding interview question I was given. The task was to count the number of cells within a specific distance from "neighborhood cells" using the "Manhattan Distance," which is measured only by horizontal and/or vertical movement.
After presenting my solution, they wanted to see me modify the code to accomodate wrapping the solution and also being able to skew the solution. This represents the final result of the code after making those modifications.
Settings
Width: Height: Distance:
Skew Factor: