Skip to content
AITroveRead. Build. Understand.

DSA in Python

Operation contracts, checked Python programs and connected learning resources.

Python programs operate on objects with explicit input, ownership and failure contracts.

Learning roadmap

This section contains 46 written lessons or quiz banks. Programs are verified on CPython 3.14.6. Standard-library lessons target 3.11+ syntax; lessons using data, web, machine-learning or testing packages state their tested dependencies separately. Framework programs use local test clients, not a deployed service. Read the stated limits before adapting a fixture into an application.

Search and traversal

Read the contract, run its program and inspect the failure case.

Selection, nesting and cached state

Read the contract, run its program and inspect the failure case.

Ordering and connectivity

Read the contract, run its program and inspect the failure case.

Text indexes and DP

Read the contract, run its program and inspect the failure case.

Linked and hierarchical state

Read the contract, run its program and inspect the failure case.

Range, tree and signed-graph invariants

Read the contract, run its program and inspect the failure case.

Balanced indexes, pruning and reconstruction

Read the contract, run its program and inspect the failure case.

Deletion repair, edge identity and compressed text indexes

Read the contract, run its program and inspect the failure case.

Graph removals, edge trails and sequence reconstruction

Read the contract, run its program and inspect the failure case.

Mutable compressed edges and optimal selection

Read the contract, run its program and inspect the failure case.

All-pairs paths and residual capacity

Read the contract, run its program and inspect the failure case.

Heuristic paths and prefix totals

Read the contract, run its program and inspect the failure case.

Bounded windows, weighted routes and capacity

Read the contract, run its program and inspect the failure case.

Continue learning

Move between tutorial, collections, advanced material and practice using the subject tabs. The sidebar changes with each section; related examples keep one canonical lesson URL.

Curriculum

Storage details