leetcode_solutions_golang

package module
v0.0.0-...-6176cdb Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Unlicense Imports: 8 Imported by: 0

README

LeetCode Solutions in Golang

Coverage

Documentation

Overview

https://leetcode.com/problems/counting-bits/

https://leetcode.com/problems/number-of-ways-to-select-buildings/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayReader

type ArrayReader interface {
	// contains filtered or unexported methods
}

https://leetcode.com/problems/search-in-a-sorted-array-of-unknown-size/

type BoardState

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

type Data

type Data struct {
	Val  int
	Freq int
}

type FreqHeap

type FreqHeap []Data

func (FreqHeap) Len

func (h FreqHeap) Len() int

func (FreqHeap) Less

func (h FreqHeap) Less(i, j int) bool

func (*FreqHeap) Pop

func (h *FreqHeap) Pop() interface{}

func (*FreqHeap) Push

func (h *FreqHeap) Push(x interface{})

func (FreqHeap) Swap

func (h FreqHeap) Swap(i, j int)

type Item

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

type LRUCache

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

func NewLruCache

func NewLruCache(capacity int) LRUCache

func (*LRUCache) Get

func (lru *LRUCache) Get(key int) int

func (*LRUCache) Put

func (lru *LRUCache) Put(key int, value int)

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type MyCalendar

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

https://leetcode.com/problems/my-calendar-i/

func CalendarConstructor

func CalendarConstructor() MyCalendar

func (*MyCalendar) Book

func (c *MyCalendar) Book(start int, end int) bool

type ParenthesesState

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

https://leetcode.com/problems/generate-parentheses/

func (ParenthesesState) IsComplete

func (s ParenthesesState) IsComplete() bool

type State

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

func NewState

func NewState(n int) *State

func (*State) Clone

func (s *State) Clone() *State

func (*State) GetKey

func (s *State) GetKey() string

func (*State) IncreaseRow

func (s *State) IncreaseRow()

func (*State) String

func (s *State) String() []string

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

type Trie

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

https://leetcode.com/problems/implement-trie-prefix-tree/

func NewTrie

func NewTrie() Trie

func (*Trie) Insert

func (this *Trie) Insert(word string)

func (*Trie) Search

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

func (*Trie) StartsWith

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

Source Files

Jump to

Keyboard shortcuts

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