idgd

package
v0.0.0-...-8d3c4b6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUm

func NewUm() unordered_map

Types

type RandomizedCollection

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

func Constructor

func Constructor() RandomizedCollection

* Initialize your data structure here.

func (*RandomizedCollection) GetRandom

func (this *RandomizedCollection) GetRandom() int

* Get a random element from the collection.

func (*RandomizedCollection) Insert

func (this *RandomizedCollection) Insert(val int) bool

* Inserts a value to the collection. Returns true if the collection did not already contain the specified element.

func (*RandomizedCollection) Remove

func (this *RandomizedCollection) Remove(val int) bool

* Removes a value from the collection. Returns true if the collection contained the specified element.

Jump to

Keyboard shortcuts

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