Skip to content

Commit ddea22e

Browse files
author
ryo
committed
add algrithm highlight
1 parent 003b60a commit ddea22e

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

python/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
# Leetcode challenge in python
2-
learn basic data structure and practice in python
2+
learn basic data structure and practice in python
3+
4+
## data structure
5+
* Queue [Link to python documentation](https://docs.python.org/3/library/queue.html)
6+
* Stack
7+
* List
8+
* Dict(Map)
9+
* Tree
10+
11+
## algrithm highlight
12+
### binary tree dfs
13+
```python
14+
def preorder(root):
15+
if root:
16+
return [root.val] + preorder(root.left) + preorder(root.right)
17+
else:
18+
return []
19+
```
20+
21+
## Environment setup
22+
### python installation
23+
```bash
24+
pipenv install
25+
pipenv shell
26+
```
27+

0 commit comments

Comments
 (0)