Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BSTIterator ¶
type BSTIterator struct {
// contains filtered or unexported fields
}
func BSTIteratorConstructor ¶
func BSTIteratorConstructor(root *TreeNode) BSTIterator
func (*BSTIterator) HasNext ¶
func (this *BSTIterator) HasNext() bool
* @return whether we have a next smallest number
type LRUCache ¶
func LRUCacheConstructor ¶
type RandomizedSet ¶
type RandomizedSet struct {
// contains filtered or unexported fields
}
func RandomizedSetConstructor ¶
func RandomizedSetConstructor() RandomizedSet
* Initialize your data structure here.
func (*RandomizedSet) GetRandom ¶
func (this *RandomizedSet) GetRandom() int
* Get a random element from the set.
func (*RandomizedSet) Insert ¶
func (this *RandomizedSet) Insert(val int) bool
* Inserts a value to the set. Returns true if the set did not already contain the specified element.
func (*RandomizedSet) Remove ¶
func (this *RandomizedSet) Remove(val int) bool
* Removes a value from the set. Returns true if the set contained the specified element.
type StringIterator ¶
type StringIterator struct { String string // contains filtered or unexported fields }
func Constructor ¶
func Constructor(compressedString string) StringIterator
func (*StringIterator) HasNext ¶
func (this *StringIterator) HasNext() bool
func (*StringIterator) Next ¶
func (this *StringIterator) Next() byte
type WordDictionary ¶
type WordDictionary struct {
// contains filtered or unexported fields
}
WordDictionary based on trie.
func (*WordDictionary) AddWord ¶
func (this *WordDictionary) AddWord(word string)
* Adds a word into the data structure.
func (*WordDictionary) Search ¶
func (this *WordDictionary) Search(word string) bool
* Returns if the word is in the data structure. A word could contain the dot character '.' to represent any one letter.
Click to show internal directories.
Click to hide internal directories.