Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliogarciape/data-structures-and-algorithms
<Data Structures and Algorithms with Python />
https://github.com/juliogarciape/data-structures-and-algorithms
algorithms data-structures data-structures-and-algorithms python python3
Last synced: about 1 month ago
JSON representation
<Data Structures and Algorithms with Python />
- Host: GitHub
- URL: https://github.com/juliogarciape/data-structures-and-algorithms
- Owner: juliogarciape
- Created: 2024-04-23T04:04:30.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-06T05:38:11.000Z (9 months ago)
- Last Synced: 2024-11-17T17:52:04.260Z (3 months ago)
- Topics: algorithms, data-structures, data-structures-and-algorithms, python, python3
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data Structures and Algorithms (Python)
## Data Structures
#### Stack:
```python
# ---- Basic Example ----my_stack = Stack() # Initialize a stack
print(my_stack.is_empty())
my_stack.push("Book A") # Add to stack
my_stack.push("Book B")
print(my_stack.get_stack()) # Get the stack
my_stack.push("Book C")
print(my_stack.get_stack())
my_stack.pop() # Remove last addition from stack
print(my_stack.get_stack())
print(my_stack.is_empty()) # Get if stack is empty
print(my_stack.peek()) # Get last addition from stack
```### Use cases for stack:
- Determine if the brackets are unbalanced
- Reverse String
- Convert Integer to Binary