ints

package
v0.0.0-...-63a78bc Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b []int)

Add adds b to a. This modifies a.

func Compare

func Compare(a, b []int) int

Compare returns 1 if a is greater than b in lexicographic order, 0 if they are equal and -1 if b is greater than a.

func Equal

func Equal(a, b []int) bool

Equal returns true if a and b are the same and false otherwise.

func HasPrefix

func HasPrefix(s, prefix []int) bool

HasPrefix returns true if s begins with prefix and false otherwise.

func Max

func Max(a []int) int

Max returns the largest int in a.

func Min

func Min(a []int) int

Min returns the smallest int in a.

func Reverse

func Reverse(a []int) []int

Reverse reverses a. This modifies a.

func Sum

func Sum(a []int) (sum int)

Sum returns the sum of the ints in a.

Types

This section is empty.

Jump to

Keyboard shortcuts

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