day368

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

This section is empty.

Types

type KeyValueStore

type KeyValueStore interface {
	// Update updates the value at key to val, or sets it if doesn't exist
	Update(key, val int)
	// Get returns the value with key or an error if no such value exists
	Get(key int) (int, error)
	// MaxKey returns the largest key with value val or error
	// if no key with that value exists
	MaxKey(val int) (int, error)
}

KeyValueStore is a key value store for the problem.

func NewKeyValueStore

func NewKeyValueStore() KeyValueStore

NewKeyValueStore returns a new instance of a KeyValueStore.

Jump to

Keyboard shortcuts

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