https://github.com/smv1999/py_dsa
The py_dsa package contains all the data structures and algorithms implementations
https://github.com/smv1999/py_dsa
algorithms data-structures dsa hacktoberfest pip programming pypi pypi-package python
Last synced: about 1 month ago
JSON representation
The py_dsa package contains all the data structures and algorithms implementations
- Host: GitHub
- URL: https://github.com/smv1999/py_dsa
- Owner: smv1999
- License: mit
- Created: 2021-07-03T14:15:04.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T15:36:12.000Z (2 months ago)
- Last Synced: 2025-03-26T15:21:15.906Z (about 2 months ago)
- Topics: algorithms, data-structures, dsa, hacktoberfest, pip, programming, pypi, pypi-package, python
- Language: Python
- Homepage: https://pypi.org/project/py-dsa/
- Size: 73.2 KB
- Stars: 19
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## py-dsa





### Introduction
The py-dsa module contains all the data structures and algorithms implementations.
### Installation
You can install the module using pip as shown below.
```bash
pip install py-dsa
```
### UsageConsider the following examples :
```python
from py_dsa.data_structures import *test_linkedlist = LinkedList()
test_linkedlist.add_first(10)
test_linkedlist.add_first(20)
test_linkedlist.add_first(30)
test_linkedlist.remove_last()
test_linkedlist.reverse_list()
test_linkedlist.print_list()
"""
Output :
20
30
"""
``````python
from py_dsa.data_structures import *test_tree = Tree()
test_tree.add(10)
test_tree.add(5)
test_tree.add(30)
print(test_tree.height())
test_tree.invert_tree()
test_tree.print_tree(traversal='postorder')
"""
Output:
2
30
5
10
"""
``````python
from py_dsa.algorithms import *a = [1, 2, 3, 4.5]
s = Searching()
print(s.linear_search(a, 3))
"""
Output :
2
"""
```
### TestingTo install py-dsa, along with the tools you need to develop and run tests. Run the following command :
```bash
$ pip install -e .[dev]
```For running the tests, type the following command :
```bash
py.test
```### Bugs/Requests
Please use the [GitHub issue tracker](https://github.com/smv1999/py_dsa/issues) to submit bugs or request features.
### License
Copyright Vaidhyanathan S M, 2021
Distributed under the terms of the [MIT](https://github.com/smv1999/py_dsa/blob/main/LICENSE) license, py-dsa is free and open source software.