Function advent_solutions::advent2017::day03::part1 [] [src]

pub fn part1(index: &usize) -> usize

While this is very space-efficient (no squares are skipped), requested data must be carried back to square 1 (the location of the only access port for this memory system) by programs that can only move up, down, left, or right. They always take the shortest path: the Manhattan Distance between the location of the data and square 1.

For example:

How many steps are required to carry the data from the square identified in your puzzle input all the way to the access port?