leetcode_go

package module
v0.0.0-...-255053c Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: MIT Imports: 4 Imported by: 0

README

leetcode-go

leetcode in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type Trie

type Trie struct {
	Prefix   byte
	Children map[byte]*Trie
	End      bool
	Remain   string
}

func Constructor

func Constructor() Trie

* Initialize your data structure here.

func (*Trie) Insert

func (t *Trie) Insert(word string)

* Inserts a word into the trie.

func (*Trie) Search

func (t *Trie) Search(word string) bool

* Returns if the word is in the trie.

func (*Trie) StartsWith

func (t *Trie) StartsWith(prefix string) bool

* Returns if there is any word in the trie that starts with the given prefix.

Jump to

Keyboard shortcuts

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