Gary Lai

438. Find All Anagrams in a String

483. Find All Anagrams in a String 1. 我們需要想的是窗口增大的時候,需要更新哪些資訊?

1268. Search Suggestions System

1268. Search Suggestions System class TrieNode: def __init__(self): self.

642. Design Search Autocomplete System

642. Design Search Autocomplete System class AutocompleteSystem: def __init__(self,

1248. Count Number of Nice Subarrays

1248. Count Number of Nice Subarrays

211. Design Add and Search Words Data Structure

211. Design Add and Search Words Data Structure 這一題比較特別,需要模糊比對搜尋的字串,

83. Remove Duplicates from Sorted List

83. Remove Duplicates from Sorted List # Definition for singly-linked list.

283. Move Zeroes

283. Move Zeroes 這個題目有點陷阱,題目要求要把零搬到最後,不過用這個角度去想的話,題目真的不好想,比較好做的做法需要有反面的想法: 把所有的零搬到後面 == 把所有非零的數字搬到前面

589. N-ary Tree Preorder Traversal

589. N-ary Tree Preorder Traversal """ # Definition for

337. House Robber III

337. House Robber III 這一題是 198. House Robber 和 213.

606. Construct String from Binary Tree

606. Construct String from Binary Tree # Definition for a binary