This repository contains Python code for exercises related to binary trees. Specifically, the code implements Breadth-First Traversal (BFS) or Level First Traversal, and Depth-First Search (DFS) traversal of a binary tree, recursively and iteratively.
The repository contains the following files:
- 1_bst.py: Contains Python code for implementing BFS of a binary tree using a deque data structure.
- 2_dfs_recursive.py: Contains code for implementing Depth-First Search (DFS) traversal of a binary tree using recursion.
- 3_dfs_iterative.py: Contains code for implementing Depth-First Search (DFS) traversal of a binary tree using an iterative approach.
To use the code in this repository, you can clone the repository to your local machine and run the Python files using a Python interpreter. The code has been tested with Python 3.
This code was created as part of a data structures and algorithms course at BloomTech.