Skip to main content
This package is designed as an educational tool for students to learn and experiment with data structures and algorithms. Written in Python with an emphasis on readability and clarity.

What is UCX DSA?

UCX DSA is a comprehensive Python package built specifically for UC Berkeley Extension’s Computer Science X404.1: Data Structures and Algorithms class. It provides clean, educational implementations of fundamental data structures and algorithms that students can use to learn core concepts.

Key Features

Complete Data Structures

Arrays, stacks, queues, linked lists, trees, heaps, tries, hash tables, and graphs

Graph Algorithms

Dijkstra’s shortest path, Prim’s minimum spanning tree, BFS, and DFS traversal

Educational Focus

Clear, readable code designed for learning rather than production optimization

Visualization Support

Built-in visualization for graphs, trees, heaps, and tries using NetworkX

Quick Start

Get started with UCX DSA in just a few steps:
1

Install the package

Install using pip from PyPI:
pip install ucxdsa
2

Import a data structure

Import any data structure you need:
from dsa.stack import Stack
from dsa.graph import Graph
3

Start using it

Begin experimenting with data structures:
stack = Stack()
stack.push(1)
stack.push(2)
print(stack.pop())  # 2

Explore the Documentation

Installation Guide

Learn how to install and update the package

Quickstart Tutorial

Get hands-on with basic data structures

Data Structures

Explore all available data structures

API Reference

Complete API documentation for all classes and methods

Why UCX DSA?

UCX DSA prioritizes educational value over performance. Each implementation is crafted to:
  • Demonstrate fundamental concepts clearly
  • Follow standard textbook algorithms (CLRS)
  • Provide readable, well-documented code
  • Support visualization and experimentation
  • Help students understand how data structures work internally
Not intended for production use. This package is designed for learning and educational purposes.

Build docs developers (and LLMs) love