day19

package
v0.0.0-...-36687a4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MinPaintingCost

func MinPaintingCost(houses Houses) int

MinPaintingCost uses dynamic programming to calculate the cheapest way to paint houses so that no adjacent houses have the same color.

Types

type Houses

type Houses []PaintingCosts

Houses represents a list of houses that can be painting a different color for a price.

type PaintingCosts

type PaintingCosts []int

PaintingCosts represents the cost to paint in each of these colors.

Jump to

Keyboard shortcuts

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