# juancardona05/data-structures-python architecture

> Architecture diagram of the GitHub repository juancardona05/data-structures-python, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/juancardona05/data-structures-python
- Repository: https://github.com/juancardona05/data-structures-python

## Overview

This repository is a collection of independent Python exercises, not a single integrated application. Its most complete user-facing workflow is a Tkinter store-inventory demo: a user enters a product code and quantity, the app looks up stock in a binary search tree, then records an order and reduces stock. Other files independently demonstrate shortest-path algorithms, graph structures, expression-tree evaluation, and a Fibonacci-based binary tree. Edges below reflect only visible calls; unsampled files and directories are not inferred.

Main entry points: [`ejemplo.py`](https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py) (Order and stock), [`MDiscretas.py`](https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py) (Expression evaluator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Store inventory"]
  node_tkui["Inventory UI<br/>[ejemplo.py]"]
  node_sales["Order and stock<br/>[ejemplo.py]"]
  node_producttree[("Product tree<br/>[ejemplo.py]")]
end

subgraph group_paths["Shortest paths"]
  node_dijkstra["Dijkstra distances<br/>[dijkstra.py]"]
  node_bellman["Bellman-Ford demo<br/>[dijkstra.py]"]
end

subgraph group_graphs["Graph structures"]
  node_directedgraph["Directed graph<br/>[Grafo.py]"]
  node_heapexercise["Heap exercise<br/>[heapqfuntion.py]"]
end

subgraph group_trees["Tree exercises"]
  node_expressionbuilder["Expression builder<br/>[MDiscretas.py]"]
  node_expressionevaluator["Expression evaluator<br/>[MDiscretas.py]"]
  node_fibonaccitree["Fibonacci tree<br/>[MDiscretas.py]"]
end

node_shopper(("Shopper"))

node_shopper -->|"enters order"| node_tkui
node_tkui -->|"submits order"| node_sales
node_sales -->|"looks up stock"| node_producttree
node_sales -->|"reduces stock"| node_producttree
node_expressionevaluator -->|"evaluates tree"| node_expressionbuilder

click node_tkui "https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py"
click node_sales "https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py"
click node_producttree "https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py"
click node_dijkstra "https://github.com/juancardona05/data-structures-python/blob/master/dijkstra.py"
click node_bellman "https://github.com/juancardona05/data-structures-python/blob/master/dijkstra.py"
click node_directedgraph "https://github.com/juancardona05/data-structures-python/blob/master/Grafo.py"
click node_heapexercise "https://github.com/juancardona05/data-structures-python/blob/master/heapqfuntion.py"
click node_expressionbuilder "https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py"
click node_expressionevaluator "https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py"
click node_fibonaccitree "https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tkui,node_sales,node_producttree toneBlue
class node_dijkstra,node_bellman toneAmber
class node_directedgraph,node_heapexercise toneMint
class node_expressionbuilder,node_expressionevaluator,node_fibonaccitree toneRose
class node_shopper toneIndigo
```

## Components

### Store inventory

- [Inventory UI](https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py): `ejemplo.py`
- [Order and stock](https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py): `ejemplo.py`
- [Product tree](https://github.com/juancardona05/data-structures-python/blob/master/ejemplo.py): `ejemplo.py`

### Shortest paths

- [Dijkstra distances](https://github.com/juancardona05/data-structures-python/blob/master/dijkstra.py): `dijkstra.py`
- [Bellman-Ford demo](https://github.com/juancardona05/data-structures-python/blob/master/dijkstra.py): `dijkstra.py`

### Graph structures

- [Directed graph](https://github.com/juancardona05/data-structures-python/blob/master/Grafo.py): `Grafo.py`
- [Heap exercise](https://github.com/juancardona05/data-structures-python/blob/master/heapqfuntion.py): `heapqfuntion.py`

### Tree exercises

- [Expression builder](https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py): `MDiscretas.py`
- [Expression evaluator](https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py): `MDiscretas.py`
- [Fibonacci tree](https://github.com/juancardona05/data-structures-python/blob/master/MDiscretas.py): `MDiscretas.py`

### Other components

- **Shopper**

## Connections

- Shopper → Inventory UI: enters order (evidence: `ejemplo.py`)
- Inventory UI → Order and stock: submits order (evidence: `ejemplo.py`)
- Order and stock → Product tree: looks up stock (evidence: `ejemplo.py`)
- Order and stock → Product tree: reduces stock (evidence: `ejemplo.py`)
- Expression evaluator → Expression builder: evaluates tree (evidence: `MDiscretas.py`)
