util

package
v0.0.0-...-bdc7dbc Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GoodColor = color.New(color.FgGreen, color.Bold)
	BadColor  = color.New(color.FgRed, color.Bold)
)

Functions

func Abs

func Abs(num int) int

func EachDigit

func EachDigit(input, base int) <-chan int

func FindNextIntInList

func FindNextIntInList(needle int, haystack []int) int

func FindNextStringInList

func FindNextStringInList(needle string, haystack []string) int

func InRange

func InRange(num, min, max int) bool

func IntSubsetOf

func IntSubsetOf(set, subset []int) bool

func LoadDefaultInt

func LoadDefaultInt() []int

func LoadDefaultString

func LoadDefaultString() []string

func LoadInt

func LoadInt(filename string) []int

func LoadIntList

func LoadIntList(filename string) []int

func LoadString

func LoadString(filename string) []string

func Max

func Max(nums ...int) int

func MaxInts

func MaxInts(vec []int) int

func Min

func Min(nums ...int) int

func MinInts

func MinInts(vec []int) int

func MinMax

func MinMax(nums ...int) (int, int)

func MinMaxInts

func MinMaxInts(vec []int) (int, int)

func Pow

func Pow(base, exp int) int

func Product

func Product(vec []int) int

func Radians

func Radians(degrees float64) float64

func RemoveAllStringsFromList

func RemoveAllStringsFromList(needle string, haystack []string) []string

func RemoveIntFromIntList

func RemoveIntFromIntList(needle int, haystack []int) []int

func Reverse

func Reverse(in string) string

func Sign

func Sign(num int) int

func StrSubsetOf

func StrSubsetOf(set, subset []string) bool

func Sum

func Sum(vec []int) int

func ToInt

func ToInt(in string) int

Types

type Solutions

type Solutions map[string][2]int

Jump to

Keyboard shortcuts

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