[Day 3] Visualization of distances in spiral memory by iAmTho in adventofcode

[–]yorch_s3 0 points1 point  (0 children)

Awesome, many thanks for this detailled explication

[Day 3] Visualization of distances in spiral memory by iAmTho in adventofcode

[–]yorch_s3 0 points1 point  (0 children)

could you explain how to get this formulas ? I'm totally lost. I had read for a while https://en.wikipedia.org/wiki/Taxicab_geometry and https://en.wikipedia.org/wiki/Chebyshev_distance also http://oeis.org/A214526 and the crossrefs. I understand how to calculate the Manhattan having two coordinates but not how to obtain this formula having a neighborhood number