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.
Click to show internal directories.
Click to hide internal directories.