Coder Social home page Coder Social logo

arka2010 / py_dsa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smv1999/py_dsa

0.0 1.0 0.0 17 KB

The py_dsa package contains all the data structures and algorithms implementations

Home Page: https://pypi.org/project/py-dsa/

License: MIT License

Python 100.00%

py_dsa's Introduction

py-dsa

GitHub followers GitHub forks GitHub Repo stars Lines of code GitHub PyPI

Introduction

The py-dsa module contains all the data structures and algorithms implementations.

Installation

You can install the module using pip as shown below.

pip install py-dsa

Usage

Consider the following examples :

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
"""
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
"""
from py_dsa.algorithms import *

a = [1, 2, 3, 4.5]
s = Searching()
print(s.linear_search(a, 3))
"""
Output : 
2
"""

Testing

To install py-dsa, along with the tools you need to develop and run tests. Run the following command :

$ pip install -e .[dev]

For running the tests, type the following command :

py.test

Bugs/Requests

Please use the GitHub issue tracker to submit bugs or request features.

License

Copyright Vaidhyanathan S M, 2021

Distributed under the terms of the MIT license, py-dsa is free and open source software.

py_dsa's People

Contributors

smv1999 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.