day90

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Random

type Random struct {
	// contains filtered or unexported fields
}

Random encapsulates math/rand.Rand

func NewRandom

func NewRandom() *Random

NewRandom returns a Random object.

func (*Random) RandMissingNumbers

func (r *Random) RandMissingNumbers(n int, l []int) int

RandMissingNumbers randomly generates a number from 0 to n-1 that isn't in l. Runs in O(N) time and O(l) space.

Jump to

Keyboard shortcuts

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