Git Product home page Git Product logo

pythonds3's Introduction

pythonds3

License: GPL v3 Supported Python versions PyPI version Build Status codecov

Data Structures package for Problem Solving with Algorithms and Data Structures using Python by Brad Miller and David Ranum.

The package is a supplement to Problem Solving with Algorithms and Data Structures using Python. It contains implementations of basic data structures, searching and sorting algorithms, trees, and graphs. Some implementation details are intentionally left out and readers are encouraged to complete them on their own.

Object-oriented programming

  • Typical class implementation
  • Use of getters, setters, and properties
  • Overriding magic methods (len, str, contains etc)

Basic data structures

  • Stack
  • Queue
  • Deque
  • Ordered linked list
  • Unordered linked list

Searching

  • HashMap

Sorting

  • Bubble sort
  • Selection sort
  • Insertion sort
  • Shell sort
  • Mergesort
  • Quicksort
  • Heapsort

Trees

  • Binary tree
  • Binary search tree
  • AVL tree
  • Binary heap
  • Priority queue

Graphs

  • Breadth first search
  • Depth first search
  • Dijkstra's shortest path algorithm
  • Bellman-Ford shortest path algorithm
  • Prim's spanning tree algorithm

pythonds3's People

Contributors

bnmnetp avatar yasinovskyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pythonds3's Issues

TypeError while importing pythonds3 in python version 3.7.9

Upon importing pythonds3, while learning stacks as part of the course pythonds3,

# Python 3.7.9 (tags/v3.7.9:13c94747c7)

import pythonds3

The following error occured:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "./venv/lib/site-packages/pythonds3/__init__.py", line 9, in <module>
    from pythonds3.trees import (
  File "./venv/lib/site-packages/pythonds3/trees/__init__.py", line 7, in <module>
    from pythonds3.trees.binary_heap import BinaryHeap
  File "./venv/lib/site-packages/pythonds3/trees/binary_heap.py", line 13, in <module>
    class BinaryHeap:
  File "./venv/lib/site-packages/pythonds3/trees/binary_heap.py", line 52, in BinaryHeap
    def heapify(self, not_a_heap: list[Any], show_details: bool = False) -> None:
TypeError: 'type' object is not subscriptable

v_3.1.0---Can't import normally

Hey, I'm a junior developer, and found an error when importing this library.
In v_3.1.0, it prints:*
Traceback (most recent call last):
File "", line 991, in _find_and_load
File "", line 961, in find_and_load_unlocked
File "", line 219, in call_with_frames_removed
File "D:\Program Files\Python3810\lib\site-packages\pythonds3_init
.py", line 9, in
from pythonds3.trees import (
File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees_init
.py", line 7, in
from pythonds3.trees.binary_heap import BinaryHeap
File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees\binary_heap.py", line 13, in
class BinaryHeap:
File "D:\Program Files\Python3810\lib\site-packages\pythonds3\trees\binary_heap.py", line 52, in BinaryHeap
def heapify(self, not_a_heap: list[Any], show_details: bool = False) -> None:
TypeError: 'type' object is not subscriptabl
v_3 1 0


But after I change the version to v_3.0.3, it can work well;

Development platform: Windows10+python3.8.10+PycharmPro2022.1

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.