Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions teaching/mentoring-winter-25/Scoping-and-Graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ author: Aryan Kumar
- [Global Code](#global-code)
- [Local Code](#local-code)
- [Nested Function Code](#nested-function-code)
- [Graphs](#graphs)
- [Search Algorithms](#search-algorithms)
- [Basic terminology](#basic-terminology)
- [Video Resources:](#video-resources)
- [Single Search Implementation for DFS and BFS](#single-search-implementation-for-dfs-and-bfs)
- [Graphs](#graphs)
- [Search Algorithms](#search-algorithms)
- [Basic terminology](#basic-terminology)
- [Video Resources:](#video-resources)
- [Single Search Implementation for DFS and BFS](#single-search-implementation-for-dfs-and-bfs)


## Python Scoping
Expand Down Expand Up @@ -132,7 +132,7 @@ def modify_enclosing() -> None:
```


### Graphs
## Graphs

Representations:
- Adjacency Matrix
Expand Down Expand Up @@ -207,10 +207,10 @@ Full list:
'''
```

### Search Algorithms
## Search Algorithms


#### Basic terminology
### Basic terminology

- Node: A point in the graph (e.g., A, B, C, etc.)
- start node: where the search begins
Expand All @@ -233,7 +233,7 @@ Full list:
- Pick a starting node, and explore all its neighbors before moving to the next level of neighbors.
- exploration order captured by a queue (FIFO)

#### Video Resources:
### Video Resources:

Quick Visualization (Short):
{% include youtube.html id="L1vGm2_cPU0" %}
Expand All @@ -244,7 +244,7 @@ In-Depth Visualization (DFS):
In-Breadth Visualization (BFS):
{% include youtube.html id="xlVX7dXLS64" %}

#### Single Search Implementation for DFS and BFS
### Single Search Implementation for DFS and BFS

```py
from collections import deque
Expand Down