The library which helps developers to implement data structures & algorithms easily without coding everything.
Project description
easyDSI 1.1.4
Python Library makes it easy for users to code and run data structures & algorithms without having to summarize everything.
Contains
Queue
- queue() - Creates an empty queue.
- queue([elements]) - Creates an queue with elements.
Methods
- add(element) - Add the element at the last position.
- add(position, element) - Add the element at the position you give.
- add_first() - Add the element at the first position.
- add_last() - Add the element at the last position.
- remove() - Delete the element from the first position.
- remove(position) - Delete the element from the position.
- remove_first() - Remove the element from the first position.
- remove_last() - Remove the element from the last position.
- index(position) - Get the element from the position.
- display() - Display all the elements.
- get_elements() - Return all the elements.
- get_size() - Get the total number of elements.
How to install
- Open your command prompt and enter the below command.
pip install easydsi
How to use
- Import the library in your project.
import easydsi as dsi
- Initialize the data structure.
queue = dsi.queue([1, 2, 3])
queue.display()
[1, 2, 3]
- Add an element.
queue.add(4)
queue.display()
[1, 2, 3, 4]
- Remove an element.
queue.remove()
queue.display()
[1, 2, 3]
How to build and upload to PyPI
Source Distribution
pip install setuptools twine
python setup.py sdist
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Wheel File
pip install setuptools wheel
python setup.py bdist_wheel
twine upload dist/*
Change Log
1.0.5 (12/06/2022)
- Double-ended queue has been added.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easydsi-1.1.4.tar.gz
(4.2 kB
view hashes)