# being-fahim/toph-solution architecture

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

- Interactive diagram: https://gitdiagram.com/being-fahim/toph-solution
- Repository: https://github.com/being-fahim/toph-solution

## Overview

This repository is a collection of independent C/C++ Toph competitive-programming solutions, not a shared application. The workflow is per program: a user or judge supplies problem input, the standalone solution computes an answer, and it prints that answer. Solutions are grouped by the repository’s Easy, Medium, and Hard directories. There is no shared runtime layer or inter-solution data flow; relationships shown are limited to each program’s input and output, as supported by its source.

Main entry points: [`Easy/Is Anagram.c`](https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Anagram.c) (Anagram check), [`Easy/Is Palindrome.c`](https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Palindrome.c) (Palindrome check), [`Medium/Cash Change.c`](https://github.com/being-fahim/toph-solution/blob/main/Medium/Cash%20Change.c) (Cash change), [`Medium/Incompatible Crops.c`](https://github.com/being-fahim/toph-solution/blob/main/Medium/Incompatible%20Crops.c) (Crop grid scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_easy["Easy solutions"]
  node_anagram["Anagram check<br/>[Is Anagram.c]"]
  node_palindrome["Palindrome check<br/>[Is Palindrome.c]"]
end

subgraph group_medium["Medium solutions"]
  node_cash["Cash change<br/>[Cash Change.c]"]
  node_crops["Crop grid scan"]
  node_matrix["Matrix multiplication"]
  node_matching["Matching brackets"]
  node_neat["Neat brackets<br/>[Neat Brackets.c]"]
  node_tidy["Tidy bits<br/>[Tidy Bits.c]"]
end

subgraph group_hard["Hard solutions"]
  node_progress["ASCII progress bar"]
  node_bpl["BPL over counter<br/>[BPL Mubarak!.c]"]
  node_blackwhite["Black or white<br/>[Black or White.c]"]
  node_cipher["Caesar cipher<br/>[Ceaser cipher.c]"]
  node_fair["Fair distribution"]
  node_prime["Prime factors<br/>[Prime Factors.c]"]
  node_union["Set union<br/>[Set Union.c]"]
  node_takeeasy["Modular calculations<br/>[Take It Easy.c]"]
  node_thought["Thought game<br/>[Thought Game.c]"]
  node_linear["Linear search<br/>[linear search1.c]"]
end

node_judge(("User / judge"))

node_judge -->|"provides input"| node_anagram
node_anagram -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_palindrome
node_palindrome -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_cash
node_cash -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_crops
node_crops -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_matrix
node_matrix -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_matching
node_matching -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_neat
node_neat -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_tidy
node_tidy -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_progress
node_progress -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_bpl
node_bpl -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_blackwhite
node_blackwhite -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_cipher
node_cipher -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_fair
node_fair -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_prime
node_prime -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_union
node_union -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_takeeasy
node_takeeasy -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_thought
node_thought -->|"prints answer"| node_judge
node_judge -->|"provides input"| node_linear
node_linear -->|"prints answer"| node_judge

click node_anagram "https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Anagram.c"
click node_palindrome "https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Palindrome.c"
click node_cash "https://github.com/being-fahim/toph-solution/blob/main/Medium/Cash%20Change.c"
click node_crops "https://github.com/being-fahim/toph-solution/blob/main/Medium/Incompatible%20Crops.c"
click node_matrix "https://github.com/being-fahim/toph-solution/blob/main/Medium/Little%20Matrix%20Multiplication.c"
click node_matching "https://github.com/being-fahim/toph-solution/blob/main/Medium/Matching%20Brackets.c"
click node_neat "https://github.com/being-fahim/toph-solution/blob/main/Medium/Neat%20Brackets.c"
click node_tidy "https://github.com/being-fahim/toph-solution/blob/main/Medium/Tidy%20Bits.c"
click node_progress "https://github.com/being-fahim/toph-solution/blob/main/Hard/ASCII%20Progress%20Bar.c"
click node_bpl "https://github.com/being-fahim/toph-solution/blob/main/Hard/BPL%20Mubarak!.c"
click node_blackwhite "https://github.com/being-fahim/toph-solution/blob/main/Hard/Black%20or%20White.c"
click node_cipher "https://github.com/being-fahim/toph-solution/blob/main/Hard/Ceaser%20cipher.c"
click node_fair "https://github.com/being-fahim/toph-solution/blob/main/Hard/Fair%20Distribution.c"
click node_prime "https://github.com/being-fahim/toph-solution/blob/main/Hard/Prime%20Factors.c"
click node_union "https://github.com/being-fahim/toph-solution/blob/main/Hard/Set%20Union.c"
click node_takeeasy "https://github.com/being-fahim/toph-solution/blob/main/Hard/Take%20It%20Easy.c"
click node_thought "https://github.com/being-fahim/toph-solution/blob/main/Hard/Thought%20Game.c"
click node_linear "https://github.com/being-fahim/toph-solution/blob/main/Hard/linear%20search1.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_anagram,node_palindrome,node_judge toneBlue
class node_cash,node_crops,node_matrix,node_matching,node_neat,node_tidy toneAmber
class node_progress,node_bpl,node_blackwhite,node_cipher,node_fair,node_prime,node_union,node_takeeasy,node_thought,node_linear toneMint
```

## Components

### Easy solutions

- [Anagram check](https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Anagram.c): `Easy/Is Anagram.c`
- [Palindrome check](https://github.com/being-fahim/toph-solution/blob/main/Easy/Is%20Palindrome.c): `Easy/Is Palindrome.c`

### Medium solutions

- [Cash change](https://github.com/being-fahim/toph-solution/blob/main/Medium/Cash%20Change.c): `Medium/Cash Change.c`
- [Crop grid scan](https://github.com/being-fahim/toph-solution/blob/main/Medium/Incompatible%20Crops.c): `Medium/Incompatible Crops.c`
- [Matrix multiplication](https://github.com/being-fahim/toph-solution/blob/main/Medium/Little%20Matrix%20Multiplication.c): `Medium/Little Matrix Multiplication.c`
- [Matching brackets](https://github.com/being-fahim/toph-solution/blob/main/Medium/Matching%20Brackets.c): `Medium/Matching Brackets.c`
- [Neat brackets](https://github.com/being-fahim/toph-solution/blob/main/Medium/Neat%20Brackets.c): `Medium/Neat Brackets.c`
- [Tidy bits](https://github.com/being-fahim/toph-solution/blob/main/Medium/Tidy%20Bits.c): `Medium/Tidy Bits.c`

### Hard solutions

- [ASCII progress bar](https://github.com/being-fahim/toph-solution/blob/main/Hard/ASCII%20Progress%20Bar.c): `Hard/ASCII Progress Bar.c`
- [BPL over counter](https://github.com/being-fahim/toph-solution/blob/main/Hard/BPL%20Mubarak!.c): `Hard/BPL Mubarak!.c`
- [Black or white](https://github.com/being-fahim/toph-solution/blob/main/Hard/Black%20or%20White.c): `Hard/Black or White.c`
- [Caesar cipher](https://github.com/being-fahim/toph-solution/blob/main/Hard/Ceaser%20cipher.c): `Hard/Ceaser cipher.c`
- [Fair distribution](https://github.com/being-fahim/toph-solution/blob/main/Hard/Fair%20Distribution.c): `Hard/Fair Distribution.c`
- [Prime factors](https://github.com/being-fahim/toph-solution/blob/main/Hard/Prime%20Factors.c): `Hard/Prime Factors.c`
- [Set union](https://github.com/being-fahim/toph-solution/blob/main/Hard/Set%20Union.c): `Hard/Set Union.c`
- [Modular calculations](https://github.com/being-fahim/toph-solution/blob/main/Hard/Take%20It%20Easy.c): `Hard/Take It Easy.c`
- [Thought game](https://github.com/being-fahim/toph-solution/blob/main/Hard/Thought%20Game.c): `Hard/Thought Game.c`
- [Linear search](https://github.com/being-fahim/toph-solution/blob/main/Hard/linear%20search1.c): `Hard/linear search1.c`

### Other components

- **User / judge**

## Connections

- User / judge → Anagram check: provides input (evidence: `Easy/Is Anagram.c`)
- Anagram check → User / judge: prints answer (evidence: `Easy/Is Anagram.c`)
- User / judge → Palindrome check: provides input (evidence: `Easy/Is Palindrome.c`)
- Palindrome check → User / judge: prints answer (evidence: `Easy/Is Palindrome.c`)
- User / judge → Cash change: provides input (evidence: `Medium/Cash Change.c`)
- Cash change → User / judge: prints answer (evidence: `Medium/Cash Change.c`)
- User / judge → Crop grid scan: provides input (evidence: `Medium/Incompatible Crops.c`)
- Crop grid scan → User / judge: prints answer (evidence: `Medium/Incompatible Crops.c`)
- User / judge → Matrix multiplication: provides input (evidence: `Medium/Little Matrix Multiplication.c`)
- Matrix multiplication → User / judge: prints answer (evidence: `Medium/Little Matrix Multiplication.c`)
- User / judge → Matching brackets: provides input (evidence: `Medium/Matching Brackets.c`)
- Matching brackets → User / judge: prints answer (evidence: `Medium/Matching Brackets.c`)
- User / judge → Neat brackets: provides input (evidence: `Medium/Neat Brackets.c`)
- Neat brackets → User / judge: prints answer (evidence: `Medium/Neat Brackets.c`)
- User / judge → Tidy bits: provides input (evidence: `Medium/Tidy Bits.c`)
- Tidy bits → User / judge: prints answer (evidence: `Medium/Tidy Bits.c`)
- User / judge → ASCII progress bar: provides input (evidence: `Hard/ASCII Progress Bar.c`)
- ASCII progress bar → User / judge: prints answer (evidence: `Hard/ASCII Progress Bar.c`)
- User / judge → BPL over counter: provides input (evidence: `Hard/BPL Mubarak!.c`)
- BPL over counter → User / judge: prints answer (evidence: `Hard/BPL Mubarak!.c`)
- User / judge → Black or white: provides input (evidence: `Hard/Black or White.c`)
- Black or white → User / judge: prints answer (evidence: `Hard/Black or White.c`)
- User / judge → Caesar cipher: provides input (evidence: `Hard/Ceaser cipher.c`)
- Caesar cipher → User / judge: prints answer (evidence: `Hard/Ceaser cipher.c`)
- User / judge → Fair distribution: provides input (evidence: `Hard/Fair Distribution.c`)
- Fair distribution → User / judge: prints answer (evidence: `Hard/Fair Distribution.c`)
- User / judge → Prime factors: provides input (evidence: `Hard/Prime Factors.c`)
- Prime factors → User / judge: prints answer (evidence: `Hard/Prime Factors.c`)
- User / judge → Set union: provides input (evidence: `Hard/Set Union.c`)
- Set union → User / judge: prints answer (evidence: `Hard/Set Union.c`)
- User / judge → Modular calculations: provides input (evidence: `Hard/Take It Easy.c`)
- Modular calculations → User / judge: prints answer (evidence: `Hard/Take It Easy.c`)
- User / judge → Thought game: provides input (evidence: `Hard/Thought Game.c`)
- Thought game → User / judge: prints answer (evidence: `Hard/Thought Game.c`)
- User / judge → Linear search: provides input (evidence: `Hard/linear search1.c`)
- Linear search → User / judge: prints answer (evidence: `Hard/linear search1.c`)
