通常題目內會有一些keyword,這些keyword可能會定應某些解法,只是參考用,不一定每次都是這樣。當看到題目沒有思緒的時候可以往這邊想。
keyword | possible related topic | ps |
---|---|---|
subarray | slinding window two pointers |
連續的element |
subarray sum | prefix sum Slinding window |
|
求個數 | Dynamic programming BIT |
|
maximum | Dynamic programming Greedy |
|
minimum | Dynamic programming Greedy |
|
條件會被所在位置 左右兩邊影響 |
two-pass three-pass |
|
找前面或是後面 比自己還大或是還小的第一個數 |
monotonic stack | |
sorted array two sum | two pointer | |
判斷是否有cyclic | topologic sort DFS |
keyword | possible related topic | ps |
---|---|---|
linked-list | fast-slow pointer recursive(把node放在call stack中) |
leetcode
刷題
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing