Interview-Tiktok-OA-monotonic Summary of Thoughts只看偶数下标上的元素(numbers[0]、numbers[2]、numbers[4]…),判断这串数字是不是单调的。 严格递增: 返回 “increasing” 严格递减: 返回 “decreasing” 既不是递增也不是递减(含相等的情况: 返回 “none” Code(Java)1234567891011121314151617String solu 2026-09-13 Interview > Tiktok #Interview #Tiktok
LeetCode75-790-Domino 动规五部曲 dp数组以及下标含义 递归公式 dp数组如何初始化 遍历顺序 打印dp数组 🧠 Summary of Thoughts可以先考虑简单一些的情况: How many ways that we can cover a 2 * N board using one type of domino (1 * 2)? 每个i列的时候,都可以是前面i-1的后面加上一个竖条。或者是i-2的后面补充 2026-09-09 LeetCode > 75 > DP #DP
LeetCode75-2336-Smallest-Number-in-Infinite-Set 🧠 Summary of ThoughtsKey InsightWe do NOT store the infinite set explicitly. Instead, we simulate it using: A pointer next → tracks the smallest number that has never been removed A min heap → store 2026-04-11 LeetCode > 75 > Heap / Priority Queue #Heap #Queue
LeetCode75-215-Kth-Largest 🧠 Summary of ThoughtsKey Observations You don’t need to fully sort the array The problem is essentially: Find the element at index n - k (0-based sorted order) Common Approaches Sorting: Sort the 2026-04-11 LeetCode > 75 > Heap / Priority Queue #Sorting #Heap #Quickselect
LeetCode75-136-Single-Number 🧠 Summary of Thoughts Use the bitwise XOR (^) operation to cancel out duplicate numbers. XOR has two important properties: a ^ a = 0 → same numbers cancel out a ^ 0 = a → zero does not af 2026-04-11 LeetCode > 75 > Bit Manipulation #Array #Bit Manipulation
LeetCode75-2300-Successful-Pairs-of-Spells-and-Potions 🧠 Summary of Thoughts Sort + Binary Search for the first valid threshold For each spell, count how many potions satisfy: spell * potion >= success If a potion works, then all stronger potions wi 2026-04-09 LeetCode > 75 > Binary Search #Sorting #Array #Binary Search
LeetCode75-374-Guess-Number 🧠 Summary of Thoughts Binary Search Update low and high to mid + 1 or mid - 1 mid = low + (high - low) / 2 return -1 ✅ Code(Java)123456789101112131415161718192021222324252627/** * Forward declarati 2026-04-09 LeetCode > 75 > Binary Search #Binary Search
LeetCode75-547-Number-of-Province 🧠 Summary of Thoughts Review Foundation 1 (CSE 2321), Adjacency Matrix is a method to interpret graph. For example: isConnected[i][j]. If 1, then i and j has edge to connect. Else (0), no edge betwe 2026-04-07 LeetCode > 75 > Graphs(DFS) #dfs #Graph Theory
LeetCode75-450-Delete-Node-in-BST 🧠 Summary of Thoughts Locate key in BST, use the property of BST below: BST property: leftNode < root < rightNode if key < root.val, then call left tree recursively if key > root.val, t 2026-03-14 LeetCode > 75 > BST #BST
LeetCode75-700-Search-in-BST 🧠 Summary of Thoughts A Binary Search Tree is an ordered Binary Tree. Binary Tree (BT)、Binary Search Tree (BST)、Heap 的核心区别: Do not utilize the properties of BST (Traverse the entire tree)This metho 2026-03-08 LeetCode > 75 > BST #BST