Skip to content

Commit

Permalink
update cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
yennanliu committed May 12, 2024
1 parent f1ca092 commit 92d0d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/cheatsheet/bfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- LC 127
- LC 1730
- Breadth first, then deep
- Usually use data structure such as `queue, array`
- Use data structure : `Queue` (FIFO)

<img src ="https://github.com/yennanliu/CS_basics/blob/master/doc/pic/bfs_2.png"></p>

Expand Down
1 change: 1 addition & 0 deletions doc/cheatsheet/dfs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# DFS
- search algorithm
- Deep first, then breadth
- Use data structure : `Stack` (FILO)
- To check if some value exists
- Inorder, preorder, postorder (can recreate a tree)
- not most efficient (VS bfs), but can handle some specific problems
Expand Down

0 comments on commit 92d0d4f

Please sign in to comment.