Documentation
¶
Overview ¶
nolint
https://leetcode.com/problems/assign-cookies/description/
Assume you are an awesome parent and want to give your children some cookies.
But, you should give each child at most one cookie.
Each child i has a greed factor g[i], which is the minimum size of a cookie that the child
will be content with; and each cookie j has a size s[j]. If s[j] >= g[i], we can assign the cookie j to the child i, and the child i will be content. Your goal is to maximize the number of your content children and output the maximum number.
Index ¶
- Constants
- func Abs(x int) int
- func Contains[T comparable](xs []T, y T) bool
- func GCD(p, q int) int
- func LCM(p, q int) int
- func LinkedListLen(n *ListNode) int
- func Maximum(xs ...int) int
- func Minimum(xs ...int) int
- func RemoveFromIntSlice(xs *[]int, k int)
- func Sum(xs ...int) int
- type BITTree
- type BSTIterator
- type Bag
- type Bags
- type BrowserHistory
- type Bucket
- type Buf1535
- type Char
- type Codec
- type Coll
- type DDL
- type DLLNode
- type Deque
- type FindElements
- type Heap787
- type IntMaxHeap
- type IntMinHeap
- type Iterator
- type KVPair
- type KthLargest
- type LFUCache
- type LFUCacheElement
- type LRUCache
- type ListNode
- type MPoint
- type MPointQ
- type MaxHeap
- type MaxPairHeap767
- type MedianFinder
- type MinHeap1976
- type MinHeap2503
- type MinStack
- type MyCalendar
- type MyCircularQueue
- type MyHashMap
- type MyHashSet
- type MyLinkedList
- type MyListNode
- type MyQueue225
- type MyQueue232
- type MyStack
- type NestedInteger
- type NestedIterator
- type Node
- type Node427
- type Num404s
- type NumArray
- type NumMatrix
- type Orange
- type Pair
- type Pair767
- type PeekingIterator
- type Point
- type Project
- type Q222
- type Q429
- type Q637
- type Queue
- type Queue1302
- type Queue433
- type Queue623
- type Queue994
- type RecentCounter
- type RevIntHeap
- type Ride
- type SeatManager
- type Set
- type SmallestInfiniteSet
- type Solution383
- type SparseVector
- type Stack1047
- type Stack1544
- type Stack32
- type Stack907
- type StockSpanner
- type SummaryRanges
- type TMPair
- type TimeMap
- type TreeNode
- type TreeNodeQ
- type Trie
- type Trie208
- type TrieNode1268
- type TrieNode211
- type TrieNode745
- type UndergroundSystem
- type Word692
- type WordDictionary
- type WordFilter
- type WordHeap692
Constants ¶
const SPACE = 2069
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](xs []T, y T) bool
Contains return true if some collection `xs` contains element `y`
func LinkedListLen ¶
LinkedListLen returns amount on nodes in linked list (ListNode)
func RemoveFromIntSlice ¶
RemoveFromIntSlice removes k-th element of Int slice in-place todo: wanna move to go2 with generics
Types ¶
type BSTIterator ¶
type BSTIterator struct {
// contains filtered or unexported fields
}
func NewBSTIterator ¶
func NewBSTIterator(root *TreeNode) BSTIterator
NewBSTIterator should call Constructor to pass LeetCode tests
func (*BSTIterator) HasNext ¶
func (i *BSTIterator) HasNext() bool
func (*BSTIterator) Next ¶
func (i *BSTIterator) Next() int
type BrowserHistory ¶
type BrowserHistory struct {
// contains filtered or unexported fields
}
func NewBrowserHistory ¶
func NewBrowserHistory(homepage string) BrowserHistory
NewBrowserHistory should call Constructor to pass LeetCode tests
func (*BrowserHistory) Back ¶
func (h *BrowserHistory) Back(steps int) string
func (*BrowserHistory) Forward ¶
func (h *BrowserHistory) Forward(steps int) string
func (*BrowserHistory) Visit ¶
func (h *BrowserHistory) Visit(url string)
type DLLNode ¶
type DLLNode struct {
// contains filtered or unexported fields
}
DLLNode is double linked list node
type Deque ¶
type Deque[T any] []T
Deque is double ended queue
func (*Deque[T]) PeekLast ¶
func (dq *Deque[T]) PeekLast() T
PeekLast returns element from the right
func (*Deque[T]) PopFirst ¶
func (dq *Deque[T]) PopFirst() T
PopFirst return and removes element from the left
type FindElements ¶
type FindElements struct {
// contains filtered or unexported fields
}
func NewFindElement ¶
func NewFindElement(root *TreeNode) FindElements
NewFindElement must be renamed to Constructor to pass Leedcode tests
func (*FindElements) Find ¶
func (e *FindElements) Find(target int) bool
type IntMaxHeap ¶
type IntMaxHeap []int
IntMaxHeap Heap implementation for Ints (root is maximum: inverted Less)
func (*IntMaxHeap) Len ¶
func (h *IntMaxHeap) Len() int
func (*IntMaxHeap) Less ¶
func (h *IntMaxHeap) Less(i, j int) bool
func (*IntMaxHeap) Pop ¶
func (h *IntMaxHeap) Pop() interface{}
Pop removes the most small element of the heap from the heap end returns this element
func (*IntMaxHeap) Swap ¶
func (h *IntMaxHeap) Swap(i, j int)
type IntMinHeap ¶
type IntMinHeap []int
IntMinHeap Heap implementation for Ints (root is minimum)
func (*IntMinHeap) Len ¶
func (h *IntMinHeap) Len() int
func (*IntMinHeap) Less ¶
func (h *IntMinHeap) Less(i, j int) bool
func (*IntMinHeap) Pop ¶
func (h *IntMinHeap) Pop() interface{}
Pop removes the most small element of the heap from the heap end returns this element
func (*IntMinHeap) Swap ¶
func (h *IntMinHeap) Swap(i, j int)
type KthLargest ¶
type KthLargest struct {
// contains filtered or unexported fields
}
func NewKthLargest ¶
func NewKthLargest(k int, nums []int) KthLargest
NewKthLargest should call `Constructor` to pass LeetCode tests
func (*KthLargest) Add ¶
func (kl *KthLargest) Add(val int) int
type LFUCache ¶
type LFUCache struct {
// contains filtered or unexported fields
}
func NewLFUCache ¶
NewLFUCache should call Constructor to pass LeetCode tests
type LFUCacheElement ¶
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
func NewLRUCache ¶
NewLRUCache should call Constructor for leetcode tests
type ListNode ¶
ListNode is licked list
func NewListNode ¶
NewListNode builds linked list of Ints from Ints slice
type MaxPairHeap767 ¶
type MaxPairHeap767 []*Pair767
func (*MaxPairHeap767) Len ¶
func (h *MaxPairHeap767) Len() int
func (*MaxPairHeap767) Less ¶
func (h *MaxPairHeap767) Less(i, j int) bool
func (*MaxPairHeap767) Pop ¶
func (h *MaxPairHeap767) Pop() interface{}
func (*MaxPairHeap767) Push ¶
func (h *MaxPairHeap767) Push(x interface{})
func (*MaxPairHeap767) Swap ¶
func (h *MaxPairHeap767) Swap(i, j int)
type MedianFinder ¶
type MedianFinder struct {
// contains filtered or unexported fields
}
func NewMedianFinder ¶
func NewMedianFinder() MedianFinder
NewMedianFinder should call Constructor to pass Leetcode tests
func (*MedianFinder) AddNum ¶
func (mf *MedianFinder) AddNum(num int)
func (*MedianFinder) FindMedian ¶
func (mf *MedianFinder) FindMedian() float64
type MinHeap1976 ¶
type MinHeap1976 [][]int
func (MinHeap1976) Len ¶
func (h MinHeap1976) Len() int
func (MinHeap1976) Less ¶
func (h MinHeap1976) Less(i, j int) bool
func (*MinHeap1976) Pop ¶
func (h *MinHeap1976) Pop() any
func (*MinHeap1976) Push ¶
func (h *MinHeap1976) Push(x any)
func (MinHeap1976) Swap ¶
func (h MinHeap1976) Swap(i, j int)
type MinHeap2503 ¶
type MinHeap2503 [][]int
func (MinHeap2503) Len ¶
func (h MinHeap2503) Len() int
func (MinHeap2503) Less ¶
func (h MinHeap2503) Less(i, j int) bool
func (*MinHeap2503) Peek ¶
func (h *MinHeap2503) Peek() []int
func (*MinHeap2503) Pop ¶
func (h *MinHeap2503) Pop() any
func (*MinHeap2503) Push ¶
func (h *MinHeap2503) Push(x any)
func (MinHeap2503) Swap ¶
func (h MinHeap2503) Swap(i, j int)
type MinStack ¶
type MinStack struct {
// contains filtered or unexported fields
}
func NewMinStack ¶
func NewMinStack() MinStack
NewMinStack should call Constructor to pass LeetCode tests
type MyCalendar ¶
type MyCalendar struct {
// contains filtered or unexported fields
}
func NewMyCalendar ¶
func NewMyCalendar() MyCalendar
NewMyCalendar should call Constructor to pass LeetCode tests
func (*MyCalendar) Book ¶
func (c *MyCalendar) Book(start, end int) bool
type MyCircularQueue ¶
type MyCircularQueue struct {
// contains filtered or unexported fields
}
func NewMyCircularQueue ¶
func NewMyCircularQueue(k int) MyCircularQueue
NewMyCircularQueue should call "Constructor" to pass LeetCode tests
func (*MyCircularQueue) DeQueue ¶
func (q *MyCircularQueue) DeQueue() bool
func (*MyCircularQueue) EnQueue ¶
func (q *MyCircularQueue) EnQueue(value int) bool
func (*MyCircularQueue) Front ¶
func (q *MyCircularQueue) Front() int
func (*MyCircularQueue) IsEmpty ¶
func (q *MyCircularQueue) IsEmpty() bool
func (*MyCircularQueue) IsFull ¶
func (q *MyCircularQueue) IsFull() bool
func (*MyCircularQueue) Rear ¶
func (q *MyCircularQueue) Rear() int
type MyHashMap ¶
type MyHashMap struct {
// contains filtered or unexported fields
}
func NewMyHashMap ¶
func NewMyHashMap() MyHashMap
NewMyHashMap is Constructor for MyHashMap (it must call Constructor for LeetCode)
type MyHashSet ¶
type MyHashSet struct {
// contains filtered or unexported fields
}
func NewMyHashSet ¶
func NewMyHashSet() MyHashSet
NewMyHashSet should call Constructor to pass LeetCode tests
type MyLinkedList ¶
type MyLinkedList struct {
// contains filtered or unexported fields
}
func NewMyLinkedList ¶
func NewMyLinkedList() MyLinkedList
NewMyLinkedList should call Constructor to pass LeedCode tests
func (*MyLinkedList) AddAtHead ¶
func (l *MyLinkedList) AddAtHead(val int)
func (*MyLinkedList) AddAtIndex ¶
func (l *MyLinkedList) AddAtIndex(index, val int)
func (*MyLinkedList) AddAtTail ¶
func (l *MyLinkedList) AddAtTail(val int)
func (*MyLinkedList) DeleteAtIndex ¶
func (l *MyLinkedList) DeleteAtIndex(index int)
func (*MyLinkedList) Get ¶
func (l *MyLinkedList) Get(index int) int
func (MyLinkedList) String ¶
func (l MyLinkedList) String() string
type MyListNode ¶
type MyListNode struct { Val int Next *MyListNode }
type MyQueue225 ¶
type MyQueue225 []int
func (*MyQueue225) IsEmpty ¶
func (q *MyQueue225) IsEmpty() bool
func (*MyQueue225) Peek ¶
func (q *MyQueue225) Peek() int
func (*MyQueue225) Pop ¶
func (q *MyQueue225) Pop() int
func (*MyQueue225) Push ¶
func (q *MyQueue225) Push(x int)
func (*MyQueue225) Size ¶
func (q *MyQueue225) Size() int
type MyQueue232 ¶
type MyQueue232 struct {
// contains filtered or unexported fields
}
func NewMyQueue232 ¶
func NewMyQueue232() MyQueue232
NewMyQueue232 should call Constructor to pass LeetCode tests
func (*MyQueue232) Empty ¶
func (q *MyQueue232) Empty() bool
func (*MyQueue232) Peek ¶
func (q *MyQueue232) Peek() int
func (*MyQueue232) Pop ¶
func (q *MyQueue232) Pop() int
func (*MyQueue232) Push ¶
func (q *MyQueue232) Push(x int)
type MyStack ¶
type MyStack struct {
// contains filtered or unexported fields
}
func NewMyStack ¶
func NewMyStack() MyStack
NewMyStack should call Constructor to pass LeetCode tests
type NestedInteger ¶
type NestedInteger struct { Val int Nested []*NestedInteger }
func NewNestedInteger ¶
func NewNestedInteger() *NestedInteger
func (*NestedInteger) Add ¶
func (n *NestedInteger) Add(elem NestedInteger)
func (NestedInteger) GetInteger ¶
func (n NestedInteger) GetInteger() int
func (NestedInteger) GetList ¶
func (n NestedInteger) GetList() []*NestedInteger
func (NestedInteger) IsInteger ¶
func (n NestedInteger) IsInteger() bool
func (*NestedInteger) SetInteger ¶
func (n *NestedInteger) SetInteger(value int)
type NestedIterator ¶
type NestedIterator struct {
// contains filtered or unexported fields
}
func NewNestedIterator ¶
func NewNestedIterator(nestedList []*NestedInteger) *NestedIterator
NewNestedIterator should call Constructor to pass LeetCode tests
func (*NestedIterator) HasNext ¶
func (i *NestedIterator) HasNext() bool
func (*NestedIterator) Next ¶
func (i *NestedIterator) Next() int
type NumArray ¶
type NumArray struct {
// contains filtered or unexported fields
}
func NewNumArray ¶
NewNumArray should call Constructor to pass Leetcode tests
type NumMatrix ¶
type NumMatrix struct {
// contains filtered or unexported fields
}
func NewNumMatrix ¶
NewNumMatrix should call Constructor to pass LeetCode tests
type PeekingIterator ¶
type PeekingIterator struct {
// contains filtered or unexported fields
}
func NewPeekingIterator ¶
func NewPeekingIterator(iter Iterator) *PeekingIterator
type RecentCounter ¶
type RecentCounter struct {
// contains filtered or unexported fields
}
func NewRecentCounter ¶
func NewRecentCounter() RecentCounter
NewRecentCounter should call Constructor to pass LeetCode's test cases
func (*RecentCounter) Ping ¶
func (rc *RecentCounter) Ping(t int) int
type RevIntHeap ¶
type RevIntHeap []int
func (RevIntHeap) Len ¶
func (h RevIntHeap) Len() int
func (RevIntHeap) Less ¶
func (h RevIntHeap) Less(i, j int) bool
func (*RevIntHeap) Pop ¶
func (h *RevIntHeap) Pop() interface{}
Pop removes the most small element of the heap from the heap end returns this element
func (RevIntHeap) Swap ¶
func (h RevIntHeap) Swap(i, j int)
type SeatManager ¶
type SeatManager struct {
// contains filtered or unexported fields
}
func NewSeatManager ¶
func NewSeatManager(n int) SeatManager
NewSeatManager should call Constructor to pass Leetcode test
func (*SeatManager) Reserve ¶
func (sm *SeatManager) Reserve() int
func (*SeatManager) Unreserve ¶
func (sm *SeatManager) Unreserve(seatNumber int)
type Set ¶
type Set[K comparable] map[K]struct{}
Set represents a set data structure above of hashmap
func NewSet ¶
func NewSet[K comparable](xs []K) Set[K]
NewSet creates a new Set from slice of comparable elements. All doubles will be removed
type SmallestInfiniteSet ¶
type SmallestInfiniteSet struct {
// contains filtered or unexported fields
}
func NewSmallestInfiniteSet ¶
func NewSmallestInfiniteSet() SmallestInfiniteSet
NewSmallestInfiniteSet should call Constructor to pass LeetCode test
func (*SmallestInfiniteSet) AddBack ¶
func (s *SmallestInfiniteSet) AddBack(num int)
func (*SmallestInfiniteSet) PopSmallest ¶
func (s *SmallestInfiniteSet) PopSmallest() int
type Solution383 ¶
type Solution383 struct {
// contains filtered or unexported fields
}
func NewSolution ¶
func NewSolution(head *ListNode) Solution383
NewSolution should call Constructor to pass LeetCode tests
func (*Solution383) GetRandom ¶
func (s *Solution383) GetRandom() int
type SparseVector ¶
type SparseVector struct {
// contains filtered or unexported fields
}
func NewSparseVector ¶
func NewSparseVector(nums []int) SparseVector
NewSparseVector should call Constructor to pass LeeCode test
type StockSpanner ¶
type StockSpanner struct {
// contains filtered or unexported fields
}
func NewStockSpanner ¶
func NewStockSpanner() StockSpanner
NewStockSpanner should call Constructor() to pass LeetCode tests
func (*StockSpanner) Next ¶
func (s *StockSpanner) Next(price int) int
type SummaryRanges ¶
type SummaryRanges struct {
// contains filtered or unexported fields
}
func NewSummaryRanges ¶
func NewSummaryRanges() SummaryRanges
NewSummaryRanges should call Constructor to pass LeetCode test
func (*SummaryRanges) AddNum ¶
func (sr *SummaryRanges) AddNum(value int)
func (*SummaryRanges) GetIntervals ¶
func (sr *SummaryRanges) GetIntervals() [][]int
type TimeMap ¶
type TimeMap struct {
// contains filtered or unexported fields
}
func NewTimeMap ¶
func NewTimeMap() TimeMap
NewTimeMap should call Constructor to pass LeetCode tests
type TreeNode ¶
TreeNode is just tn.TreeNode to save back compatibility
func FindTreeNode ¶
FindTreeNode returns TreeNode with value v if it exist, otherwise - nil
func NewTreeNode ¶
NewTreeNode creates a new TreeNode, ignores errors
type TreeNodeQ ¶
type TreeNodeQ []*TreeNode
TreeNodeQ is FIFO queue for TreeNode's
type Trie ¶
type Trie[V any] struct { Val V // contains filtered or unexported fields }
Trie is prefix tree
type Trie208 ¶
type Trie208 struct {
// contains filtered or unexported fields
}
func Constructor ¶
func Constructor() Trie208
func NewTrie208 ¶
func (*Trie208) StartsWith ¶
type TrieNode1268 ¶
type TrieNode1268 struct {
// contains filtered or unexported fields
}
func (*TrieNode1268) DFSWithPrefix ¶
func (n *TrieNode1268) DFSWithPrefix(prefix string, acc *[]string)
func (*TrieNode1268) GetWordsStartingWith ¶
func (n *TrieNode1268) GetWordsStartingWith(prefix string) []string
func (*TrieNode1268) Insert ¶
func (n *TrieNode1268) Insert(s string)
func (*TrieNode1268) String ¶
func (n *TrieNode1268) String() string
type TrieNode211 ¶
type TrieNode211 struct { IsWord bool Next map[rune]*TrieNode211 }
func NewTrieNode211 ¶
func NewTrieNode211() *TrieNode211
func (*TrieNode211) AddWord ¶
func (tn *TrieNode211) AddWord(word string)
func (*TrieNode211) Search ¶
func (tn *TrieNode211) Search(word string) bool
type TrieNode745 ¶
type TrieNode745 struct {
// contains filtered or unexported fields
}
func NewTrieNode ¶
func NewTrieNode() *TrieNode745
type UndergroundSystem ¶
type UndergroundSystem struct {
// contains filtered or unexported fields
}
func NewUndergroundSystem ¶
func NewUndergroundSystem() UndergroundSystem
NewUndergroundSystem should call Constructor() to pass LeetCode tests
func (*UndergroundSystem) CheckIn ¶
func (s *UndergroundSystem) CheckIn(id int, stationName string, t int)
func (*UndergroundSystem) CheckOut ¶
func (s *UndergroundSystem) CheckOut(id int, stationName string, t int)
func (*UndergroundSystem) GetAverageTime ¶
func (s *UndergroundSystem) GetAverageTime(startStation, endStation string) float64
type WordDictionary ¶
type WordDictionary struct {
// contains filtered or unexported fields
}
func NewWordDictionary ¶
func NewWordDictionary() WordDictionary
NewWordDictionary should call Constructor to pass LeeCode testa
func (*WordDictionary) AddWord ¶
func (wd *WordDictionary) AddWord(word string)
func (*WordDictionary) Search ¶
func (wd *WordDictionary) Search(word string) bool
type WordFilter ¶
type WordFilter struct {
// contains filtered or unexported fields
}
func NewWordFilter ¶
func NewWordFilter(words []string) WordFilter
NewWordFilter should call Constructor to pass LeetCode tests
func (*WordFilter) F ¶
func (wf *WordFilter) F(prefix, suffix string) int
type WordHeap692 ¶
type WordHeap692 []Word692
func (*WordHeap692) Len ¶
func (w *WordHeap692) Len() int
func (*WordHeap692) Less ¶
func (w *WordHeap692) Less(i, j int) bool
func (*WordHeap692) Pop ¶
func (w *WordHeap692) Pop() any
func (*WordHeap692) Push ¶
func (w *WordHeap692) Push(x any)
func (*WordHeap692) Swap ¶
func (w *WordHeap692) Swap(i, j int)
Source Files
¶
- s0001_two_sum.go
- s0002_add_two_numbers.go
- s0003_longest_substring_without_repeating_characters.go
- s0005_longest_palindromic_substring.go
- s0006_zigzag_conversion.go
- s0007_reverse_integer.go
- s0008_string_to_integer_(atoi).go
- s0011_container_with_most_water.go
- s0013_roman_to_integer.go
- s0014_longest_common_prefix.go
- s0015_3sum.go
- s0016_3sum_closest.go
- s0017_letter_combinations_of_a_phone_number.go
- s0019_remove_nth_node_from_end_of_list.go
- s0020_valid_parentheses.go
- s0021_merge_two_sorted_lists.go
- s0022_generate_parentheses.go
- s0023_merge_k_sorted_lists.go
- s0024_swap_nodes_in_pairs.go
- s0025_reverse_nodes_in_k-group.go
- s0026_remove_duplicates_from_sorted_array.go
- s0027_remove_element.go
- s0028_implement_strstr().go
- s0029_divide_two_integers.go
- s0032_longest_valid_parentheses.go
- s0033_search_in_rotated_sorted_array.go
- s0034_find_first_and_last_position_of_element_in_sorted_array.go
- s0035_search_insert_position.go
- s0036_valid_sudoku.go
- s0038_count_and_say.go
- s0039_combination_sum.go
- s0040_combination_sum_ii.go
- s0043_multiply_strings.go
- s0045_jump_game_ii.go
- s0046_permutations.go
- s0047_permutations_ii.go
- s0048_rotate_image.go
- s0049_group_anagrams.go
- s0051_n-queens.go
- s0052_n-queens_ii.go
- s0053_maximum_subarray.go
- s0054_spiral_matrix.go
- s0055_jump_game.go
- s0056_merge_intervals.go
- s0057_insert_interval.go
- s0058_length_of_last_word.go
- s0059_spiral_matrix_ii.go
- s0061_rotate_list.go
- s0063_unique_paths_ii.go
- s0064_minimum_path_sum.go
- s0066_plus_one.go
- s0067_add_binary.go
- s0070_climbing_stairs.go
- s0071_simplify_path.go
- s0072_edit_distance.go
- s0074_search_a_2d_matrix.go
- s0075_sort_colors.go
- s0077_combinations.go
- s0078_subsets.go
- s0079_word_search.go
- s0080_remove_duplicates_from_sorted_array_ii.go
- s0082_remove_duplicates_from_sorted_list_ii.go
- s0083_remove_duplicates_from_sorted_list.go
- s0086_partition_list.go
- s0088_merge_sorted_array.go
- s0090_subsets_ii.go
- s0092_reverse_linked_list_ii.go
- s0093_restore_ip_addresses.go
- s0094_binary_tree_inorder_traversal.go
- s0097_interleaving_string.go
- s0098_validate_binary_search_tree.go
- s0100_same_tree.go
- s0101_symmetric_tree.go
- s0102_binary_tree_level_order_traversal.go
- s0103_binary_tree_zigzag_level_order_traversal.go
- s0104_maximum_depth_of_binary_tree.go
- s0105_construct_binary_tree_from_preorder_and_inorder_traversal.go
- s0106_construct_binary_tree_from_inorder_and_postorder_traversal.go
- s0108_convert_sorted_array_to_binary_search_tree.go
- s0109_convert_sorted_list_to_binary_search_tree.go
- s0110_balanced_binary_tree.go
- s0112_path_sum.go
- s0113_path_sum_ii.go
- s0114_flatten_binary_tree_to_linked_list.go
- s0116_populating_next_right_pointers_in_each_node.go
- s0117_populating_next_right_pointers_in_each_node_ii.go
- s0118_pascals_triangle.go
- s0119_pascals_triangle_ii.go
- s0120_triangle.go
- s0121_best_time_to_buy_and_sell_stock.go
- s0122_best_time_to_buy_and_sell_stock_ii.go
- s0125_valid_palindrome.go
- s0126_word_ladder_ii.go
- s0128_longest_consecutive_sequence.go
- s0129_sum_root_to_leaf_numbers.go
- s0130_surrounded_regions.go
- s0131_palindrome_partitioning.go
- s0134_gas_station.go
- s0135_candy.go
- s0136_single_number.go
- s0139_word_break.go
- s0141_linked_list_cycle.go
- s0142_linked_list_cycle_ii.go
- s0143_reorder_list.go
- s0144_binary_tree_preorder_traversal.go
- s0145_binary_tree_postorder_traversal.go
- s0146_lru_cache.go
- s0148_sort_list.go
- s0149_max_points_on_a_line.go
- s0151_reverse_words_in_a_string.go
- s0153_find_minimum_in_rotated_sorted_array.go
- s0155_Min_Stack.go
- s0160_intersection_of_two_linked_lists.go
- s0162_find_peak_element.go
- s0167_two_sum_ii_-_input_array_is_sorted.go
- s0169_majority_element.go
- s0171_excel_sheet_column_number.go
- s0173_binary_search_tree_iterator.go
- s0187_repeated_dna_sequences.go
- s0189_rotate_array.go
- s0190_reverse_bits.go
- s0198_house_robber.go
- s0199_binary_tree_right_side_view.go
- s0200_number_of_islands.go
- s0203_remove_linked_list_elements.go
- s0205_isomorphic_strings.go
- s0206_reverse_linked_list.go
- s0208_implement_trie_(prefix_tree).go
- s0209_minimum_size_subarray_sum.go
- s0211_design_add_and_search_words_data_structure.go
- s0212_word_search_ii.go
- s0213_house_robber_ii.go
- s0215_kth_largest_element_in_an_array.go
- s0216_combination_sum_iii.go
- s0217_contains_duplicate.go
- s0219_contains_duplicate_ii.go
- s0222_count_complete_tree_nodes.go
- s0223_rectangle_area.go
- s0225_implement_stack_using_queues.go
- s0226_invert_binary_tree.go
- s0227_basic_calculator_ii.go
- s0228_summary_ranges.go
- s0230_kth_smallest_element_in_a_bst.go
- s0231_power_of_two.go
- s0232_implement_queue_using_stacks.go
- s0234_palindrome_linked_list.go
- s0235_lowest_common_ancestor_of_a_binary_search_tree.go
- s0236_lowest_common_ancestor_of_a_binary_tree.go
- s0237_delete_node_in_a_linked_list.go
- s0238_product_of_array_except_self.go
- s0240_search_a_2d_matrix_ii.go
- s0242_valid_anagram.go
- s0256_paint_house.go
- s0258_add_digits.go
- s0263_ugly_number.go
- s0268_missing_number.go
- s0278_first_bad_version.go
- s0279_perfect_squares.go
- s0283_move_zeroes.go
- s0284_peeking_iterator.go
- s0290_word_pattern.go
- s0295_find_median_from_data_stream.go
- s0297_serialize_and_deserialize_binary_tree.go
- s0300_longest_increasing_subsequence.go
- s0304_range_sum_query_2d_-_immutable.go
- s0307_range_sum_query_-_mutable.go
- s0315_count_of_smaller_numbers_after_self.go
- s0318_maximum_product_of_word_lengths.go
- s0322_coin_change.go
- s0326_power_of_three.go
- s0328_odd_even_linked_list.go
- s0329_longest_increasing_path_in_a_matrix.go
- s0334_increasing_triplet_subsequence.go
- s0341_flatten_nested_list_iterator.go
- s0342_power_of_four.go
- s0344_reverse_string.go
- s0345_reverse_vowels_of_a_string.go
- s0347_top_k_frequent_elements.go
- s0349_intersection_of_two_arrays.go
- s0350_intersection_of_two_arrays_ii.go
- s0352_data_stream_as_disjoint_intervals.go
- s0354_russian_doll_envelopes.go
- s0368_largest_divisible_subset.go
- s0374_guess_number_higher_or_lower.go
- s0376_wiggle_subsequence.go
- s0377_combination_sum_iv.go
- s0378_kth_smallest_element_in_a_sorted_matrix.go
- s0382_linked_list_random_node.go
- s0383_ransom_note.go
- s0387_first_unique_character_in_a_string.go
- s0389_find_the_difference.go
- s0392_is_subsequence.go
- s0404_sum_of_left_leaves.go
- s0406_queue_reconstruction_by_height.go
- s0409_longest_palindrome.go
- s0413_arithmetic_slices.go
- s0414_third_maximum_number.go
- s0415_add_strings.go
- s0416_partition_equal_subset_sum.go
- s0427_construct_quad_tree.go
- s0429_n-ary_tree_level_order_traversal.go
- s0433_minimum_genetic_mutation.go
- s0435_non-overlapping_intervals.go
- s0438_find_all_anagrams_in_a_string.go
- s0443_string_compression.go
- s0450_delete_node_in_a_bst.go
- s0451_sort_characters_by_frequency.go
- s0452_Minimum_Number_of_Arrows_to_Burst_Balloons.go
- s0455_assign_cookies.go
- s0456_132_pattern.go
- s0458_poor_pigs.go
- s0459_repeated_substring_pattern.go
- s0460_lfu_cache.go
- s0462_minimum_moves_to_equal_array_elements_ii.go
- s0463_island_perimeter.go
- s0472_concatenated_words.go
- s0473_matchsticks_to_square.go
- s0474_ones_and_zeroes.go
- s0491_non_decreasing_subsequences.go
- s0501_find_mode_in_binary_search_tree.go
- s0502_IPO.go
- s0509_fibonacci_number.go
- s0510_inorder_successor_in_bst_ii.go
- s0520_detect_capital.go
- s0521_longest_uncommon_subsequence_i.go
- s0523_continuous_subarray_sum.go
- s0540_single_element_in_a_sorted_array.go
- s0542_01_matrix.go
- s0547_number_of_provinces.go
- s0557_reverse_words_in_a_string_iii.go
- s0560_subarray_sum_equals_k.go
- s0566_reshape_the_matrix.go
- s0567_permutation_in_string.go
- s0572_subtree_of_another_tree.go
- s0576_out_of_boundary_paths.go
- s0581_shortest_unsorted_continuous_subarray.go
- s0583_delete_operation_for_two_strings.go
- s0605_can_place_flowers.go
- s0617_merge_two_binary_trees.go
- s0622_design_circular_queue.go
- s0623_add_one_row_to_tree.go
- s0629_k_inverse_pairs_array.go
- s0630_course_schedule_iii.go
- s0637_average_of_levels_in_binary_tree.go
- s0645_set_mismatch.go
- s0647_palindromic_substrings.go
- s0652_find_duplicate_subtrees.go
- s0653_two_sum_iv_-_input_is_a_bst.go
- s0657_robot_return_to_origin.go
- s0665_non_decreasing_array.go
- s0668_kth_smallest_number_in_multiplication_table.go
- s0674_longest_continuous_increasing_subsequence.go
- s0680_valid_palindrome_ii.go
- s0682_baseball_game.go
- s0692_top_k_frequent_words.go
- s0695_max_area_of_island.go
- s0700_search_in_a_binary_search_tree.go
- s0701_insert_into_a_binary_search_tree.go
- s0703_kth_largest_element_in_a_stream.go
- s0704_binary_search.go
- s0705_design_hashset.go
- s0706_design_hashmap.go
- s0707_design_linked_list.go
- s0713_subarray_product_less_than_k.go
- s0729_my_calendar_i.go
- s0733_flood_fill.go
- s0740_delete_and_earn.go
- s0743_network_delay_time.go
- s0745_prefix_and_suffix_search.go
- s0746_min_cost_climbing_stairs.go
- s0763_partition_labels.go
- s0766_toeplitz_matrix.go
- s0767_reorganize_string.go
- s0783_minimum_distance_between_bst_nodes.go
- s0784_letter_case_permutation.go
- s0787_cheapest_flights_within_k_stops.go
- s0792_number_of_matching_subsequences.go
- s0797_all_paths_from_source_to_target.go
- s0804_unique_morse_code_words.go
- s0814_binary_tree_pruning.go
- s0820_short_encoding_of_words.go
- s0823_binary_trees_with_factors.go
- s0841_keys_and_rooms.go
- s0844_backspace_string_compare.go
- s0858_mirror_reflection.go
- s0867_transpose_matrix.go
- s0869_reordered_power_of_2.go
- s0875_koko_eating_bananas.go
- s0876_middle_of_the_linked_list.go
- s0890_find_and_replace_pattern.go
- s0896_monotonic_array.go
- s0897_increasing_order_search_tree.go
- s0899_orderly_queue.go
- s0901_online_stock_span.go
- s0904_fruit_into_baskets.go
- s0905_sort_array_by_parity.go
- s0907_sum_of_subarray_minimums.go
- s0909_snakes_and_ladders.go
- s0912_sort_an_array.go
- s0916_word_subsets.go
- s0918_maximum_sum_circular_subarray.go
- s0926_flip_string_to_monotone_increasing.go
- s0933_number_of_recent_calls.go
- s0938_range_sum_of_bst.go
- s0942_di_string_match.go
- s0944_delete_columns_to_make_sorted.go
- s0946_validate_stack_sequences.go
- s0953_verifying_an_alien_dictionary.go
- s0958_check_completeness_of_a_binary_tree.go
- s0961_n-repeated_element_in_size_2n_array.go
- s0968_binary_tree_cameras.go
- s0973_k_closest_points_to_origin.go
- s0974_subarray_sums_divisible_by_k.go
- s0976_largest_perimeter_triangle.go
- s0977_squares_of_a_sorted_array.go
- s0981_time_based_key-value_store.go
- s0983_minimum_cost_for_tickets.go
- s0986_interval_list_intersections.go
- s0989_add_to_array-form_of_integer.go
- s0994_rotting_oranges.go
- s0997_find_the_town_judge.go
- s1011_capacity_to_ship_packages_within_d_days.go
- s1022_sum_of_root_to_leaf_binary_numbers.go
- s1046_last_stone_weight.go
- s1047_remove_all_adjacent_duplicates_in_string.go
- s1048_longest_string_chain.go
- s1061_lexicographically_smallest_equivalent_string.go
- s1071_greatest_common_divisor_of_strings.go
- s1074_number_of_submatrices_that_sum_to_target.go
- s1089_duplicate_zeros.go
- s1091_shortest_path_in_binary_matrix.go
- s1108_defanging_an_ip_address.go
- s1123_lowest_common_ancestor_of_deepest_leaves.go
- s1129_shortest_path_with_alternating_colors.go
- s1137_n-th_tribonacci_number.go
- s1162_as_far_from_land_as_possible.go
- s1182_shortest_distance_to_target_color.go
- s1192_critical_connections_in_a_network.go
- s1207_unique_number_of_occurrences.go
- s1209_remove_all_adjacent_duplicates_in_string_ii.go
- s1220_count_vowels_permutation.go
- s1239_maximum_length_of_a_concatenated_string_with_unique_characters.go
- s1249_minimum_remove_to_make_valid_parentheses.go
- s1261_find_elements_in_a_contaminated_binary_tree.go
- s1268_search_suggestions_system.go
- s1302_deepest_leaves_sum.go
- s1319_number_of_operations_to_make_network_connected.go
- s1323_maximum_69_number.go
- s1328_break_a_palindrome.go
- s1329_sort_the_matrix_diagonally.go
- s1331_rank_transform_of_an_array.go
- s1332_remove_palindromic_subsequences.go
- s1337_the_k_weakest_rows_in_a_matrix.go
- s1338_reduce_array_size_to_the_half.go
- s1342_number_of_steps_to_reduce_a_number_to_zero.go
- s1345_jump_game_iv.go
- s1354_construct_target_array_with_multiple_sums.go
- s1358_number_of_substrings_containing_all_three_characters.go
- s1379_find_a_corresponding_node_of_a_binary_tree_in_a_clone_of_that_tree.go
- s1394_find_lucky_integer_in_an_array.go
- s1396_design_underground_system.go
- s1402_reducing_dishes.go
- s1415_the_k-th_lexicographical_string_of_all_happy_strings_of_length_n.go
- s1423_maximum_points_you_can_obtain_from_cards.go
- s1424_diagonal_traverse_ii.go
- s1436_destination_city.go
- s1441_build_an_array_with_stack_operations.go
- s1443_minimum_time_to_collect_all_apples_in_a_tree.go
- s1448_count_good_nodes_in_binary_tree.go
- s1461_check_if_a_string_contains_all_binary_codes_of_size_k.go
- s1465_maximum_area_of_a_piece_of_cake_after_horizontal_and_vertical_cuts.go
- s1466_reorder_routes_to_make_all_paths_lead_to_the_city_zero.go
- s1470_shuffle_the_array.go
- s1472_design_browser_history.go
- s1480_running_sum_of_1d_array.go
- s1481_least_number_of_unique_integers_after_k_removals.go
- s1491_average_salary_excluding_the_minimum_and_maximum_salary.go
- s1503_last_moment_before_all_ants_fall_out_of_a_plank.go
- s1519_number_of_nodes_in_the_sub-tree_with_the_same_label.go
- s1523_count_odd_numbers_in_an_interval_range.go
- s1524_number_of_sub-arrays_with_odd_sum.go
- s1534_count_good_triplets.go
- s1535_find_the_winner_of_an_array_game.go
- s1539_kth_missing_positive_number.go
- s1544_make_the_string_great.go
- s1557_minimum_number_of_vertices_to_reach_all_nodes.go
- s1561_maximum_number_of_coins_you_can_get.go
- s1570_dot_product_of_two_sparse_vectors.go
- s1598_crawler_log_folder.go
- s1614_maximum_nesting_depth_of_the_parentheses.go
- s1626_best_team_with_no_conflicts.go
- s1630_arithmetic_subarrays.go
- s1641_count_sorted_vowel_strings.go
- s1642_furthest_building_you_can_reach.go
- s1647_minimum_deletions_to_make_character_frequencies_unique.go
- s1657_determine_if_two_strings_are_close.go
- s1658_minimum_operations_to_reduce_x_to_zero.go
- s1662_check_if_two_string_arrays_are_equivalent.go
- s1672_richest_customer_wealth.go
- s1675_minimize_deviation_in_array.go
- s1679_max_number_of_k-sum_pairs.go
- s1685_sum_of_absolute_differences_in_a_sorted_array.go
- s1689_partitioning_into_minimum_number_of_deci-binary_numbers.go
- s1695_maximum_erasure_value.go
- s1696_jump_game_vi.go
- s1704_determine_if_string_halves_are_alike.go
- s1706_where_will_the_ball_fall.go
- s1710_maximum_units_on_a_truck.go
- s1743_restore_the_array_from_adjacent_pairs.go
- s1759_count_number_of_homogenous_substrings.go
- s1768_merge_strings_alternately.go
- s1814_count_nice_pairs_in_an_array.go
- s1822_sign_of_the_product_of_an_array.go
- s1823_find_the_winner_of_the_circular_game.go
- s1832_check_if_the_sentence_is_pangram.go
- s1833_maximum_ice_cream.go
- s1838_frequency_of_the_most_frequent_element.go
- s1845_seat_reservation_manager.go
- s1863_sum_of_all_subset_xor_totals.go
- s1876_substrings_of_size_three_with_distinct_characters.go
- s1877_minimize_maximum_pair_sum_in_array.go
- s1921_eliminate_maximum_number_of_monsters.go
- s1922_count_good_numbers.go
- s1926_nearest_exit_from_entrance_in_maze.go
- s1976_number_of_ways_to_arrive_at_destination.go
- s1980_find_unique_binary_string.go
- s2033_minimum_operations_to_make_a_uni-value_grid.go
- s2095_delete_the_middle_node_of_a_linked_list.go
- s2114_maximum_number_of_words_found_in_sentences.go
- s2115_find_all_possible_recipes_from_given_supplies.go
- s2124_check_if_all_as_appears_before_all_bs.go
- s2131_longest_palindrome_by_concatenating_two_letter_words.go
- s2133_check_if_every_row_and_column_contains_all_numbers.go
- s2140_solving_questions_with_brainpower.go
- s2154_keep_multiplying_found_values_by_two.go
- s2176_count_equal_and_divisible_pairs_in_an_array.go
- s2187_minimum_time_to_complete_trips.go
- s2206_divide_array_into_equal_pairs.go
- s2215_find_the_difference_of_two_arrays.go
- s2225_find_players_with_zero_or_one_losses.go
- s2226_maximum_candies_allocated_to_k_children.go
- s2244_minimum_rounds_to_complete_all_tasks.go
- s2246_longest_path_with_different_adjacent_characters.go
- s2256_minimum_average_difference.go
- s2265_count_nodes_equal_to_average_of_subtree.go
- s2279_Maximum_Bags_With_Full_Capacity_of_Rocks.go
- s2293_min_max_game.go
- s2306_naming_a_company.go
- s2316_count_unreachable_pairs_of_nodes_in_an_undirected_graph.go
- s2336_smallest_number_in_infinite_set.go
- s2348_number_of_zero-filled_subarrays.go
- s2359_find_closest_node_to_given_two_nodes.go
- s2360_longest_cycle_in_a_graph.go
- s2375_construct_smallest_number_from_di_string.go
- s2379_minimum_recolors_to_get_k_consecutive_black_blocks.go
- s2389_longest_subsequence_with_limited_sum.go
- s2390_removing_stars_from_a_string.go
- s2391_minimum_amount_of_time_to_collect_garbage.go
- s2401_longest_nice_subarray.go
- s2405_optimal_partition_of_string.go
- s2421_number_of_good_paths.go
- s2433_find_the_original_array_of_prefix_xor.go
- s2439_minimize_maximum_of_array.go
- s2444_count_subarrays_with_fixed_bounds.go
- s2477_minimum_fuel_cost_to_report_to_the_capital.go
- s2492_minimum_score_of_a_path_between_two_cities.go
- s2503_maximum_number_of_points_from_grid_queries.go
- s2523_closest_prime_numbers_in_range.go
- s2529_maximum_count_of_positive_integer_and_negative_integer.go
- s2537_count_the_number_of_good_subarrays.go
- s2551_put_marbles_in_bags.go
- s2560_house_robber_iv.go
- s2570_merge_two_2d_arrays_by_summing_values.go
- s2594_minimum_time_to_repair_cars.go
- s2685_count_the_number_of_complete_components.go
- s2780_minimum_index_of_a_valid_split.go
- s2843_count_symmetric_integers.go
- s2849_determine_if_a_cell_is_reachable_at_a_given_time.go
- s2873_maximum_value_of_an_ordered_triplet_i.go
- s2874_maximum_value_of_an_ordered_triplet_ii.go
- s2942_find_words_containing_character.go
- s2965_find_missing_and_repeated_values.go
- s2999_count_the_number_of_powerful_integers.go
- s3105_longest_strictly_increasing_or_strictly_decreasing_subarray.go
- s3131_find_the_integer_added_to_array_i.go
- s3169_count_days_without_meetings.go
- s3191_minimum_operations_to_make_binary_array_elements_equal_to_one_i.go
- s3208_alternating_groups_ii.go
- s3356_zero_array_transformation_ii.go
- s3375_minimum_operations_to_make_array_values_equal_to_k.go
- s3394_check_if_grid_can_be_cut_into_sections.go
- s3396_minimum_number_of_operations_to_make_elements_in_array_distinct.go
- types.go
- utils.go