leetcode-279 - Perfect Squares

動機 複習換硬幣的dp isqrt是個很貴的運算 ...

July 23, 2021 · 1 min · zhengcf

leetcode-287 - Find the Duplicate Number

動機 這題有很多有趣的解法 ...

July 23, 2021 · 2 min · zhengcf

leetcode-34 - Find First and Last Position of Element in Sorted Array

動機 lowerbound與upperbound只差一個等號!! ...

July 22, 2021 · 1 min · zhengcf

leetcode-17 - Letter Combinations of a Phone Number

動機 複習backtrack ...

July 22, 2021 · 1 min · zhengcf

leetcode-136 - Single Number

動機 XOR!! ...

July 22, 2021 · 1 min · zhengcf

leetcode-138 - Copy List with Random Pointer

動機 這種copy有ptr的都要另外存新複製的node ...

July 22, 2021 · 2 min · zhengcf

leetcode-76 - Minimum Window Substring

動機 現在寫sliding window的風格跟以前完全不一樣 ...

July 22, 2021 · 3 min · zhengcf

leetcode-295 - Find Median from Data Stream

動機 寫解題心得才意識到,這就是與two pointer很像 ...

July 22, 2021 · 2 min · zhengcf

leetcode-152 - Maximum Product Subarray

動機 LIS的進化版 ...

July 22, 2021 · 1 min · zhengcf

leetcode-128 - Longest Consecutive Sequence

動機 令人回想到73 如果找不到範圍就先看看怎麼定義頭吧 ...

July 22, 2021 · 1 min · zhengcf