# d1da-1103/d1da_code architecture

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

- Interactive diagram: https://gitdiagram.com/d1da-1103/d1da_code
- Repository: https://github.com/d1da-1103/d1da_code

## Overview

This repository is a collection of independent programming exercises, not one integrated application. The visible workflow for each is a user supplying console input, a standalone program computing an answer, and the program printing it; the examples span dynamic programming, sequence processing, recursion, and combinatorics. Sampled files show no shared runtime services or calls between exercises. The graph focuses on the excerpted C++ programs; the many Python and other C++ exercises in the tree are likewise separate, but their behavior is not established by the available excerpts.

Main entry points: [`TTUD/grideasy/index.cpp`](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/grideasy/index.cpp) (Grid paths), [`TTUD/maxcsarr/index.cpp`](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/maxcsarr/index.cpp) (Max common sum), [`TTUD/subarrm/index.cpp`](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/subarrm/index.cpp) (Subset sum counts), [`TTUD/brickbuild/index.cpp`](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/brickbuild/index.cpp) (Brick arrangements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dp["Dynamic programming"]
  node_gridpaths["Grid paths<br/>[index.cpp]"]
  node_maxcommon["Max common sum<br/>[index.cpp]"]
  node_subsetsum["Subset sum counts<br/>[index.cpp]"]
  node_brickbuild["Brick arrangements<br/>[index.cpp]"]
end

subgraph group_sequence["Sequence problems"]
  node_sequence5["Five-term sequences<br/>[index.cpp]"]
  node_stringfold["Folded string lookup<br/>[index.cpp]"]
  node_brickstack["Brick stacking<br/>[index.cpp]"]
  node_fibomin["Next Fibonacci<br/>[index.cpp]"]
end

subgraph group_recursion["Recursive functions"]
  node_functiong["Function g<br/>[index.cpp]"]
  node_fibo3["Fibonacci-like f<br/>[index.cpp]"]
end

subgraph group_combinatorics["Combinatorics"]
  node_partitions["Integer partitions<br/>[index.cpp]"]
  node_fixedparts["Fixed-part sums<br/>[index.cpp]"]
end

node_user(("Console user"))

node_user -->|"enters dimensions"| node_gridpaths
node_gridpaths -->|"prints count"| node_user
node_user -->|"enters sequences"| node_maxcommon
node_maxcommon -->|"prints maximum"| node_user
node_user -->|"enters target and values"| node_subsetsum
node_subsetsum -->|"prints count"| node_user
node_user -->|"enters size"| node_brickbuild
node_brickbuild -->|"prints arrangements"| node_user
node_user -->|"enters values"| node_sequence5
node_sequence5 -->|"prints count"| node_user
node_user -->|"enters string and queries"| node_stringfold
node_stringfold -->|"prints characters"| node_user
node_user -->|"enters brick sizes"| node_brickstack
node_brickstack -->|"prints height"| node_user
node_user -->|"enters bound"| node_fibomin
node_fibomin -->|"prints next value"| node_user
node_user -->|"enters n"| node_functiong
node_functiong -->|"prints g value"| node_user
node_user -->|"enters n"| node_fibo3
node_fibo3 -->|"prints f value"| node_user
node_user -->|"enters n"| node_partitions
node_partitions -->|"prints partitions"| node_user
node_user -->|"enters n and m"| node_fixedparts
node_fixedparts -->|"prints decompositions"| node_user

click node_gridpaths "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/grideasy/index.cpp"
click node_maxcommon "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/maxcsarr/index.cpp"
click node_subsetsum "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/subarrm/index.cpp"
click node_brickbuild "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/brickbuild/index.cpp"
click node_sequence5 "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/Sequence5/index.cpp"
click node_stringfold "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/chuoixoan/index.cpp"
click node_brickstack "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/brickstack/index.cpp"
click node_fibomin "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/FIBOMIN/index.cpp"
click node_functiong "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/functiong/index.cpp"
click node_fibo3 "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/fibo3easy/index.cpp"
click node_partitions "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/sumn/index.cpp"
click node_fixedparts "https://github.com/d1da-1103/d1da_code/blob/main/TTUD/sumnm/index.cpp"

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_gridpaths,node_maxcommon,node_subsetsum,node_brickbuild,node_user toneBlue
class node_sequence5,node_stringfold,node_brickstack,node_fibomin toneAmber
class node_functiong,node_fibo3 toneMint
class node_partitions,node_fixedparts toneRose
```

## Components

### Dynamic programming

- [Grid paths](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/grideasy/index.cpp): `TTUD/grideasy/index.cpp`
- [Max common sum](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/maxcsarr/index.cpp): `TTUD/maxcsarr/index.cpp`
- [Subset sum counts](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/subarrm/index.cpp): `TTUD/subarrm/index.cpp`
- [Brick arrangements](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/brickbuild/index.cpp): `TTUD/brickbuild/index.cpp`

### Sequence problems

- [Five-term sequences](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/Sequence5/index.cpp): `TTUD/Sequence5/index.cpp`
- [Folded string lookup](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/chuoixoan/index.cpp): `TTUD/chuoixoan/index.cpp`
- [Brick stacking](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/brickstack/index.cpp): `TTUD/brickstack/index.cpp`
- [Next Fibonacci](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/FIBOMIN/index.cpp): `TTUD/FIBOMIN/index.cpp`

### Recursive functions

- [Function g](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/functiong/index.cpp): `TTUD/functiong/index.cpp`
- [Fibonacci-like f](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/fibo3easy/index.cpp): `TTUD/fibo3easy/index.cpp`

### Combinatorics

- [Integer partitions](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/sumn/index.cpp): `TTUD/sumn/index.cpp`
- [Fixed-part sums](https://github.com/d1da-1103/d1da_code/blob/main/TTUD/sumnm/index.cpp): `TTUD/sumnm/index.cpp`

### Other components

- **Console user**

## Connections

- Console user → Grid paths: enters dimensions (evidence: `TTUD/grideasy/index.cpp`)
- Grid paths → Console user: prints count (evidence: `TTUD/grideasy/index.cpp`)
- Console user → Max common sum: enters sequences (evidence: `TTUD/maxcsarr/index.cpp`)
- Max common sum → Console user: prints maximum (evidence: `TTUD/maxcsarr/index.cpp`)
- Console user → Subset sum counts: enters target and values (evidence: `TTUD/subarrm/index.cpp`)
- Subset sum counts → Console user: prints count (evidence: `TTUD/subarrm/index.cpp`)
- Console user → Brick arrangements: enters size (evidence: `TTUD/brickbuild/index.cpp`)
- Brick arrangements → Console user: prints arrangements (evidence: `TTUD/brickbuild/index.cpp`)
- Console user → Five-term sequences: enters values (evidence: `TTUD/Sequence5/index.cpp`)
- Five-term sequences → Console user: prints count (evidence: `TTUD/Sequence5/index.cpp`)
- Console user → Folded string lookup: enters string and queries (evidence: `TTUD/chuoixoan/index.cpp`)
- Folded string lookup → Console user: prints characters (evidence: `TTUD/chuoixoan/index.cpp`)
- Console user → Brick stacking: enters brick sizes (evidence: `TTUD/brickstack/index.cpp`)
- Brick stacking → Console user: prints height (evidence: `TTUD/brickstack/index.cpp`)
- Console user → Next Fibonacci: enters bound (evidence: `TTUD/FIBOMIN/index.cpp`)
- Next Fibonacci → Console user: prints next value (evidence: `TTUD/FIBOMIN/index.cpp`)
- Console user → Function g: enters n (evidence: `TTUD/functiong/index.cpp`)
- Function g → Console user: prints g value (evidence: `TTUD/functiong/index.cpp`)
- Console user → Fibonacci-like f: enters n (evidence: `TTUD/fibo3easy/index.cpp`)
- Fibonacci-like f → Console user: prints f value (evidence: `TTUD/fibo3easy/index.cpp`)
- Console user → Integer partitions: enters n (evidence: `TTUD/sumn/index.cpp`)
- Integer partitions → Console user: prints partitions (evidence: `TTUD/sumn/index.cpp`)
- Console user → Fixed-part sums: enters n and m (evidence: `TTUD/sumnm/index.cpp`)
- Fixed-part sums → Console user: prints decompositions (evidence: `TTUD/sumnm/index.cpp`)
