Skip to main content

Data Structures and Algorithms Source Code

Project description

UC Berkeley Extension - Data Structures and Algorithms Class

A collection of classes and functions for use in UC Berkeley Extension's Comp Sci X404.1: Data Structures and Algorithms Class.

API Documentation

Command Line Installation

pip install ucxdsa

Updating an existing version of the DSA package

pip install --upgrade ucxdsa

Quick Usage Guide

from dsa.modulename import classname

To determine the version, enter the following in Python or Jupyter:

import dsa
print(dsa.version)

or from the terminal

pip show ucdsa

Revision History

2025.2.9

  • Refactored Dijkstra's algorithm code
  • Added delete_edge() method to graphs
  • Removed all duplicate add_edge() methods such as add_adjacent_vertex()
  • Removed all add_directed_edge() methods and added directed argument to add_edge()
  • Minor comment fixes

2025.1.31

  • Fixed bug when DoublyLinkedList delete of the last index throws an Exception

2025.1.29

  • Added is_sorted() in sorttools
  • Fixed a bug when displaying a TreeNode in repr() format
  • Update some modules to be more pyright compliant

2025.1.19

  • Fixed bug in Queue to_list() method (thanks, Charles!)

2025.1.17

  • Updated hash function code

2025.1.15

  • Cleaned up README.md

2024.12.24

  • Made default size for Trie graph larger
  • Cleaned up Heap module
  • Cleaned up Huffman module to use DSA data structures
  • Added more tests
  • Added more details to documentation

2024.12.22

  • Created Github Pages access to documentation
  • Added more details to documentation

2024.08.16.1

Fixed versioning issue. Can now determine version by typing:

import dsa
dsa.version

or

dsa.__version__

2024.08.16

moved Trie end_marker from an instance variable to a class variable (Trie.end_marker)

2024.08.15

dsa.draw

  • new module to provide optional NetworkX graphics to:
  • graphs
  • tries
  • trees
  • heaps

dsa module

ran code through RUFF

dsa.graphs module

  • Added vertices() method to AdjacencyListGraph, AdjacencyListWeightedGraph
  • Dropped Vertex classes

dsa.tree

renamed Node class to TreeNode

2024.7.23

dsa.graphs module

  • added is_edge() methods for AdjacencyMatrixGraph, AdjacencyMatrixWeightedGraph, AdjacencyListGraph, AdjacencyListWeightedGraph
  • added index operator (returns a list of adjacent labels) for AdjacencyMatrixGraph, AdjacencyMatrixWeightedGraph
  • cleaned up and refactored parameter names

2024.7.19

dsa.graphs module

  • Added AdjacencyMatrixGraph, AdjacencyMatrixWeightedGraph, AdjacencyListGraph, AdjacencyListWeightedGraph
  • Deprecated: Vertex, WeightedVertex

dsa.heap module

  • Removed MinHeap option from the Heap class
  • Added dedicated MinHeap class
  • Added Priority Queue class

dsa package

Misc. code improvements, documentation updates and API consistency

TODO

  • Make an abstract Graph class

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ucxdsa-2025.2.9.tar.gz (90.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ucxdsa-2025.2.9.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

ucxdsa-2025.2.9-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file ucxdsa-2025.2.9.tar.gz.

File metadata

  • Download URL: ucxdsa-2025.2.9.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for ucxdsa-2025.2.9.tar.gz
Algorithm Hash digest
SHA256 9a710a6ed46dd60bbf1be302386cb9b2135818f9601fc408875f1d715bdd51ad
MD5 3cce68f413f2a19d84b30d21ea9ef3fc
BLAKE2b-256 b9a2921222c9c4e57875b3ba969184e8c2d92de69539423a28dc072fe5c57a7b

See more details on using hashes here.

File details

Details for the file ucxdsa-2025.2.9.0-py3-none-any.whl.

File metadata

  • Download URL: ucxdsa-2025.2.9.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for ucxdsa-2025.2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73046c073cfbe704bbbb5fd3ed1d34db85913331604f302c76bf66c452a8d442
MD5 9bce022aead8689ede1c61f047b31bed
BLAKE2b-256 380db04165053203d600c3fc78a937454576cc0d760577a74b54b8acbdb73421

See more details on using hashes here.

File details

Details for the file ucxdsa-2025.2.9-py3-none-any.whl.

File metadata

  • Download URL: ucxdsa-2025.2.9-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for ucxdsa-2025.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 953839cee76bb8a959f965b4e8707d3cf7406a921ff1c8883b75f492033217bc
MD5 19a54dac9643bec014377c4e098f5210
BLAKE2b-256 a901820d9e34ea1b45d9043c7ed3518f7d9793f7a83f1a47cf2769b4309b0d6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page