https://github.com/lukman-01/udacity-python-dsa
Solutions to the exercises from Udacity course on Data Structures and Algorithms in Python.
https://github.com/lukman-01/udacity-python-dsa
datastructures-algorithms python3
Last synced: 4 months ago
JSON representation
Solutions to the exercises from Udacity course on Data Structures and Algorithms in Python.
- Host: GitHub
- URL: https://github.com/lukman-01/udacity-python-dsa
- Owner: Lukman-01
- Created: 2023-05-17T21:34:18.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-08T21:43:32.000Z (10 months ago)
- Last Synced: 2025-01-10T19:52:38.745Z (6 months ago)
- Topics: datastructures-algorithms, python3
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Md
Awesome Lists containing this project
README
# Python Data Structures and Algorithms (DSA) Solutions
This repository contains solutions to the exercises from the Udacity course on Data Structures and Algorithms in Python. Each folder in this repository corresponds to a different data structure or algorithm covered in the course.
## Folder Structure
- `stack/`
Solutions to problems related to stack operations, such as implementing a stack, balancing parentheses, etc.- `queue/`
Exercises related to queues, including FIFO operations, circular queues, and dequeue implementations.- `linked_list/`
Solutions to exercises involving singly and doubly linked lists, such as reversing a linked list, detecting cycles, and merging sorted linked lists.- `tree/`
Includes problems on various types of trees (binary tree, binary search tree, etc.), such as traversals (inorder, preorder, postorder), tree height, and finding the least common ancestor (LCA).- `graph/`
Contains solutions to graph-based problems, such as breadth-first search (BFS), depth-first search (DFS), shortest path algorithms (Dijkstra's), and detecting cycles in a graph.- `sorting_algorithms/`
Solutions for sorting algorithm problems such as bubble sort, merge sort, quicksort, and insertion sort.- `others/`
Miscellaneous problems covering additional data structures and algorithms like heaps, hash tables, dynamic programming, and recursion.## Course Topics Covered
1. **Stacks**
Basic stack operations, balancing parentheses, and stack-based problem-solving.2. **Queues**
Queue operations, circular queues, and use cases like the producer-consumer problem.3. **Linked Lists**
Singly and doubly linked lists, efficient manipulation, and memory management.4. **Trees**
Binary trees, binary search trees, AVL trees, and tree traversals (inorder, preorder, postorder).5. **Graphs**
Representations of graphs, BFS, DFS, shortest path algorithms, and topological sorting.6. **Sorting Algorithms**
Comparison-based sorts (bubble sort, quicksort, merge sort) and non-comparison sorts.7. **Other Topics**
Hashing, dynamic programming, recursion, heaps, and additional algorithms.## Getting Started
### Prerequisites
To run the Python scripts, you'll need Python 3.x installed on your machine. You can download Python from [here](https://www.python.org/downloads/).
### Running the Solutions
To run a particular exercise, navigate to the corresponding folder and execute the Python file. For example, to run the linked list exercises:
```bash
cd LinkedList
python3 LinkedList_Exercise.py
```Each solution file includes comments explaining the problem and the approach used to solve it.