# laghazar/1337-piscine-42 architecture

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

- Interactive diagram: https://gitdiagram.com/laghazar/1337-piscine-42
- Repository: https://github.com/laghazar/1337-piscine-42

## Overview

#### Purpose and Repository Shape
This is a personal 42/1337 June 2021 Piscine solution archive, not a unified application. It organizes independent C and shell exercises by curriculum day (`C00`–`C13`), timed-exam practice (`EXAM00`–`EXAM03`), and a Rush project. Each exercise is normally self-contained and compiled/run separately.

#### Entry Points and Execution Model
Most C exercises expose a single `ft_*` implementation; many have adjacent local driver programs for manual validation, e.g. `C00/ex00/ft_putchar.c` and `C00/ex00/ft_putchar_main.c`. Command-line exercises own their executable entry point directly, such as `C06/ex00/ft_print_program_name.c`. Shell exercises are directly executable scripts/files under `Shell00` and `Shell01`, e.g. `Shell01/ex02/find_sh.sh`.

#### Foundational C Exercise Progression
Early directories establish low-level language primitives: character output and loops in `C00/ex08/ft_print_combn.c`; pointer, array, and mutation operations in `C01/ex08/ft_sort_int_tab.c`; and string copy, classification, casing, and byte formatting in `C02/ex12/ft_print_memory.c`. These are independent implementations rather than shared dependencies.

#### String, Numeric, and Allocation Layer
Middle exercises implement common C-style routines: comparisons and concatenation under `C03/ex05/ft_strlcat.c`, parsing/base conversion under `C04/ex05/ft_atoi_base.c`, and iterative/recursive math algorithms under `C05/ex07/ft_find_next_prime.c`. Heap allocation and derived string/array structures are introduced in `C07/ex02/ft_ultimate_range.c`, `C07/ex03/ft_strjoin.c`, and `C07/ex05/ft_split.c`. Ownership and freeing are local to each exercise’s contract.

#### Interfaces, Libraries, and Builds
Header-based type/API boundaries appear in `C08/ex04/ft_stock_str.h` with its structure producer `C08/ex04/ft_strs_to_tab.c`, and in `C08/ex05/ft_stock_str.h` with renderer `C08/ex05/ft_show_tab.c`. C09 evolves standalone utility sources into library packaging: `C09/ex00/libft_creator.sh` and the Make-based layout in `C09/ex01/Makefile`, `C09/ex01/includes/ft.h`, and `C09/ex01/srcs/`. Standard C compilation and Make are the material build infrastructure; no external runtime services are present.

#### Higher-Order and Data-Structure Components
Function-pointer control flow is exercised through collection traversal, mapping, and predicates in `C11/ex00/ft_foreach.c`, `C11/ex01/ft_map.c`, and `C11/ex04/ft_is_sort.c`. The calculator is a multi-source command-line program with operator dispatch and arithmetic implementations: `C11/ex05/srcs/do-op.c`, `C11/ex05/srcs/do_op.h`, and `C11/ex05/Makefile`. Linked-list operations share an exercise-local `t_list` contract, e.g. `C12/ex12/ft_list.h` and `C12/ex12/ft_list_remove_if.c`; binary-tree traversal and search use analogous `t_btree` headers in `C13/ex05/ft_btree.h` and `C13/ex07/btree_apply_by_level.c`.

#### Practice and Project Boundaries
Exam folders package isolated prompt-specific submissions with their subject text, e.g. `EXAM02/6-ft_split/ft_split.c` and `EXAM02/6-ft_split/subject.en.txt`; they do not integrate with curriculum implementations. Rush00 is the main multi-file procedural program: `Rush00/ex00/main.c` drives selectable pattern functions in `Rush00/ex00/rush00.c` through `Rush00/ex00/rush04.c`, using `Rush00/ex00/ft_putchar.c` for output. Curriculum PDFs and exam subject files define requirements externally, under `subjects/` and each exam directory.

Main entry points: [`C12/ex12/ft_list_remove_if.c`](https://github.com/laghazar/1337-piscine-42/blob/main/C12/ex12/ft_list_remove_if.c) (Linked-list operations), [`C01/ex08/ft_sort_int_tab.c`](https://github.com/laghazar/1337-piscine-42/blob/main/C01/ex08/ft_sort_int_tab.c) (Pointers & arrays), [`C02/ex12/ft_print_memory.c`](https://github.com/laghazar/1337-piscine-42/blob/main/C02/ex12/ft_print_memory.c) (String primitives), [`C03/ex05/ft_strlcat.c`](https://github.com/laghazar/1337-piscine-42/blob/main/C03/ex05/ft_strlcat.c) (String composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Curriculum Exercises"]
  node_c00["Output &amp; loops<br/>C exercise<br/>[ft_print_combn.c]"]
  node_c01["Pointers &amp; arrays<br/>C exercise<br/>[ft_sort_int_tab.c]"]
  node_c02["String primitives<br/>C exercise<br/>[ft_print_memory.c]"]
  node_c03["String composition<br/>C exercise<br/>[ft_strlcat.c]"]
  node_c04["Parsing &amp; bases<br/>C exercise<br/>[ft_atoi_base.c]"]
  node_c05["Math algorithms<br/>C exercise"]
  node_c07["Allocation routines<br/>C exercises<br/>[ft_split.c]"]
end

subgraph group_packaging["Interfaces &amp; Builds"]
  node_stock_header["Stock-string API<br/>C header<br/>[ft_stock_str.h]"]
  node_stock_producer["Structure producer<br/>C implementation<br/>[ft_strs_to_tab.c]"]
  node_stock_renderer["Structure renderer<br/>C implementation<br/>[ft_show_tab.c]"]
  node_libft_creator{{"Library creator<br/>shell build script<br/>[libft_creator.sh]"}}
  node_libft_make{{"Make library layout<br/>Make build"}}
end

subgraph group_advanced["Higher-Order &amp; Structures"]
  node_callbacks["Callback collections<br/>C exercises<br/>[ft_map.c]"]
  node_calculator["do-op calculator<br/>CLI program<br/>[do-op.c]"]
  node_list_ops["Linked-list operations<br/>C exercise"]
  node_list_contract["t_list contract<br/>C header<br/>[ft_list.h]"]
  node_tree_ops["Binary-tree traversal<br/>C exercise"]
  node_tree_contract["t_btree contract<br/>C header<br/>[ft_btree.h]"]
end

subgraph group_practice["Practice &amp; Projects"]
  node_exam_submission["Exam ft_split submission<br/>isolated submission<br/>[ft_split.c]"]
  node_rush_main["Rush00 entry point<br/>C main<br/>[main.c]"]
  node_rush_patterns["Rush patterns<br/>C implementations<br/>[rush00.c]"]
  node_rush_output["Character output<br/>C implementation<br/>[ft_putchar.c]"]
end

node_c00 -.->|"curriculum progression"| node_c01
node_c01 -.->|"curriculum progression"| node_c02
node_c02 -.->|"curriculum progression"| node_c03
node_c03 -.->|"curriculum progression"| node_c04
node_c04 -.->|"curriculum progression"| node_c05
node_c05 -.->|"curriculum progression"| node_c07
node_stock_producer -->|"uses contract"| node_stock_header
node_stock_renderer -->|"uses contract"| node_stock_header
node_libft_creator -.->|"library packaging progression"| node_libft_make
node_callbacks -.->|"C11 progression"| node_calculator
node_calculator -.->|"curriculum progression"| node_list_ops
node_list_ops -->|"uses t_list"| node_list_contract
node_list_ops -.->|"curriculum progression"| node_tree_ops
node_tree_ops -->|"uses t_btree"| node_tree_contract
node_exam_submission -.->|"similar isolated prompt"| node_c07
node_rush_main -->|"selects pattern"| node_rush_patterns
node_rush_patterns -->|"prints through"| node_rush_output

click node_c00 "https://github.com/laghazar/1337-piscine-42/blob/main/C00/ex08/ft_print_combn.c"
click node_c01 "https://github.com/laghazar/1337-piscine-42/blob/main/C01/ex08/ft_sort_int_tab.c"
click node_c02 "https://github.com/laghazar/1337-piscine-42/blob/main/C02/ex12/ft_print_memory.c"
click node_c03 "https://github.com/laghazar/1337-piscine-42/blob/main/C03/ex05/ft_strlcat.c"
click node_c04 "https://github.com/laghazar/1337-piscine-42/blob/main/C04/ex05/ft_atoi_base.c"
click node_c05 "https://github.com/laghazar/1337-piscine-42/blob/main/C05/ex07/ft_find_next_prime.c"
click node_c07 "https://github.com/laghazar/1337-piscine-42/blob/main/C07/ex05/ft_split.c"
click node_stock_header "https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex04/ft_stock_str.h"
click node_stock_producer "https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex04/ft_strs_to_tab.c"
click node_stock_renderer "https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex05/ft_show_tab.c"
click node_libft_creator "https://github.com/laghazar/1337-piscine-42/blob/main/C09/ex00/libft_creator.sh"
click node_libft_make "https://github.com/laghazar/1337-piscine-42/blob/main/C09/ex01/Makefile"
click node_callbacks "https://github.com/laghazar/1337-piscine-42/blob/main/C11/ex01/ft_map.c"
click node_calculator "https://github.com/laghazar/1337-piscine-42/blob/main/C11/ex05/srcs/do-op.c"
click node_list_ops "https://github.com/laghazar/1337-piscine-42/blob/main/C12/ex12/ft_list_remove_if.c"
click node_list_contract "https://github.com/laghazar/1337-piscine-42/blob/main/C12/ex12/ft_list.h"
click node_tree_ops "https://github.com/laghazar/1337-piscine-42/blob/main/C13/ex07/btree_apply_by_level.c"
click node_tree_contract "https://github.com/laghazar/1337-piscine-42/blob/main/C13/ex05/ft_btree.h"
click node_exam_submission "https://github.com/laghazar/1337-piscine-42/blob/main/EXAM02/6-ft_split/ft_split.c"
click node_rush_main "https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/main.c"
click node_rush_patterns "https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/rush00.c"
click node_rush_output "https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/ft_putchar.c"

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_c00,node_c01,node_c02,node_c03,node_c04,node_c05,node_c07 toneBlue
class node_stock_header,node_stock_producer,node_stock_renderer,node_libft_creator,node_libft_make toneAmber
class node_callbacks,node_calculator,node_list_ops,node_list_contract,node_tree_ops,node_tree_contract toneMint
class node_exam_submission,node_rush_main,node_rush_patterns,node_rush_output toneRose
```

## Components

### Curriculum Exercises

Independent C exercises organized by day.

- [Output & loops](https://github.com/laghazar/1337-piscine-42/blob/main/C00/ex08/ft_print_combn.c): C exercise · `C00/ex08/ft_print_combn.c`
- [Pointers & arrays](https://github.com/laghazar/1337-piscine-42/blob/main/C01/ex08/ft_sort_int_tab.c): C exercise · `C01/ex08/ft_sort_int_tab.c`
- [String primitives](https://github.com/laghazar/1337-piscine-42/blob/main/C02/ex12/ft_print_memory.c): C exercise · `C02/ex12/ft_print_memory.c`
- [String composition](https://github.com/laghazar/1337-piscine-42/blob/main/C03/ex05/ft_strlcat.c): C exercise · `C03/ex05/ft_strlcat.c`
- [Parsing & bases](https://github.com/laghazar/1337-piscine-42/blob/main/C04/ex05/ft_atoi_base.c): C exercise · `C04/ex05/ft_atoi_base.c`
- [Math algorithms](https://github.com/laghazar/1337-piscine-42/blob/main/C05/ex07/ft_find_next_prime.c): C exercise · `C05/ex07/ft_find_next_prime.c`
- [Allocation routines](https://github.com/laghazar/1337-piscine-42/blob/main/C07/ex05/ft_split.c): C exercises · Locally owned dynamic strings and arrays. · `C07/ex05/ft_split.c`

### Interfaces & Builds

Header contracts and library packaging exercises.

- [Stock-string API](https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex04/ft_stock_str.h): C header · Defines the shared structure contract. · `C08/ex04/ft_stock_str.h`
- [Structure producer](https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex04/ft_strs_to_tab.c): C implementation · `C08/ex04/ft_strs_to_tab.c`
- [Structure renderer](https://github.com/laghazar/1337-piscine-42/blob/main/C08/ex05/ft_show_tab.c): C implementation · `C08/ex05/ft_show_tab.c`
- [Library creator](https://github.com/laghazar/1337-piscine-42/blob/main/C09/ex00/libft_creator.sh): shell build script · `C09/ex00/libft_creator.sh`
- [Make library layout](https://github.com/laghazar/1337-piscine-42/blob/main/C09/ex01/Makefile): Make build · Builds utility sources through a public header. · `C09/ex01/Makefile`

### Higher-Order & Structures

Function-pointer, calculator, list, and tree exercises.

- [Callback collections](https://github.com/laghazar/1337-piscine-42/blob/main/C11/ex01/ft_map.c): C exercises · Traversal, mapping, and predicate patterns. · `C11/ex01/ft_map.c`
- [do-op calculator](https://github.com/laghazar/1337-piscine-42/blob/main/C11/ex05/srcs/do-op.c): CLI program · Multi-source arithmetic command-line program. · `C11/ex05/srcs/do-op.c`
- [Linked-list operations](https://github.com/laghazar/1337-piscine-42/blob/main/C12/ex12/ft_list_remove_if.c): C exercise · `C12/ex12/ft_list_remove_if.c`
- [t_list contract](https://github.com/laghazar/1337-piscine-42/blob/main/C12/ex12/ft_list.h): C header · `C12/ex12/ft_list.h`
- [Binary-tree traversal](https://github.com/laghazar/1337-piscine-42/blob/main/C13/ex07/btree_apply_by_level.c): C exercise · `C13/ex07/btree_apply_by_level.c`
- [t_btree contract](https://github.com/laghazar/1337-piscine-42/blob/main/C13/ex05/ft_btree.h): C header · `C13/ex05/ft_btree.h`

### Practice & Projects

Exam submissions and the Rush program.

- [Exam ft_split submission](https://github.com/laghazar/1337-piscine-42/blob/main/EXAM02/6-ft_split/ft_split.c): isolated submission · Prompt-specific practice implementation. · `EXAM02/6-ft_split/ft_split.c`
- [Rush00 entry point](https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/main.c): C main · Selects and runs a pattern. · `Rush00/ex00/main.c`
- [Rush patterns](https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/rush00.c): C implementations · `Rush00/ex00/rush00.c`
- [Character output](https://github.com/laghazar/1337-piscine-42/blob/main/Rush00/ex00/ft_putchar.c): C implementation · `Rush00/ex00/ft_putchar.c`

## Connections

- Output & loops → Pointers & arrays: curriculum progression
- Pointers & arrays → String primitives: curriculum progression
- String primitives → String composition: curriculum progression
- String composition → Parsing & bases: curriculum progression
- Parsing & bases → Math algorithms: curriculum progression
- Math algorithms → Allocation routines: curriculum progression
- Structure producer → Stock-string API: uses contract
- Structure renderer → Stock-string API: uses contract
- Library creator → Make library layout: library packaging progression
- Callback collections → do-op calculator: C11 progression
- do-op calculator → Linked-list operations: curriculum progression
- Linked-list operations → t_list contract: uses t_list
- Linked-list operations → Binary-tree traversal: curriculum progression
- Binary-tree traversal → t_btree contract: uses t_btree
- Exam ft_split submission → Allocation routines: similar isolated prompt
- Rush00 entry point → Rush patterns: selects pattern
- Rush patterns → Character output: prints through
