day15

package
v0.0.0-...-291aae9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(input string, row int) int

func Part2

func Part2(input string, rowcol int) int

The key insight for part2 is that the only possible position for the distress beacon is going to be distance+1 to one of the sensors. So we can simply check the border at distance+1 for each sensor and remove the parts which are included in other sensors' disallow area.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL