leetcode-1351 - Count Negative Numbers in a Sorted Matrix

動機 reverse iterator好讚 ...

August 7, 2021 · 1 min · zhengcf

leetcode-1346 - Check If N and Its Double Exist

動機 注意正負數的2倍,分別會變大變小 ...

August 7, 2021 · 1 min · zhengcf

leetcode-658 - Find K Closest Elements

動機 bisect的index要處理好 就算是greedy,也要讓程式判斷再去長 你的sliding window不是我的sliding windows ...

August 1, 2021 · 1 min · zhengcf

leetcode-852 - Peak Index in a Mountain Array

動機 用bsearch去猜數字 ...

August 1, 2021 · 1 min · zhengcf

leetcode-74 - Search a 2D Matrix

動機 這種題目是不是就是saddleback就好了 ...

July 31, 2021 · 1 min · zhengcf

leetcode-744 - Find Smallest Letter Greater Than Target

動機 複習upper bound ...

July 31, 2021 · 1 min · zhengcf

leetcode-704 - Binary Search

動機 複習bsearch ...

July 31, 2021 · 1 min · zhengcf

leetcode-278 - First Bad Version

動機 複習lower bound ...

July 27, 2021 · 1 min · zhengcf

leetcode-81 - Search in Rotated Sorted Array II

動機 這題是33的follow-up 如果多了重複怎麼辦? ...

July 27, 2021 · 2 min · zhengcf

leetcode-350 - Intersection of Two Arrays II

動機 如果沒有限制就很水 ...

July 25, 2021 · 1 min · zhengcf