mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
feat: add the section of the introduction to dynamic programming (#571)
* add the section of the introduction to dynamic programming * add a code comments.
This commit is contained in:
@ -318,7 +318,7 @@
|
||||
|
||||
```python title=""
|
||||
def algorithm(n: int) -> None:
|
||||
a = 0 # O(1)
|
||||
a = 0 # O(1)
|
||||
b = [0] * 10000 # O(1)
|
||||
if n > 10:
|
||||
nums = [0] * n # O(n)
|
||||
|
||||
Reference in New Issue
Block a user