# tanmaysahay94/algorithm architecture

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

- Interactive diagram: https://gitdiagram.com/tanmaysahay94/algorithm
- Repository: https://github.com/tanmaysahay94/algorithm

## Overview

This repository is an archive of independent C, C++, Java, and Python programs—not a single application or shared runtime. Its principal workflow is a person supplying problem input to an individual solution, which computes and prints a result. The README describes the collection broadly; sampled programs confirm standalone input/compute/output behavior. The graph groups the archive by language and preserves representative sampled solutions; most files are independent, so no internal calls between them are implied.

Main entry points: [`C/0060_bsearch.c`](https://github.com/tanmaysahay94/algorithm/blob/master/C/0060_bsearch.c) (Binary search demo), [`C/0127_DRAGNXOR.c`](https://github.com/tanmaysahay94/algorithm/blob/master/C/0127_DRAGNXOR.c) (Bitwise XOR), [`C/0236_bsearch.c`](https://github.com/tanmaysahay94/algorithm/blob/master/C/0236_bsearch.c) (Randomized search), [`CPP/0473_pipeline.cpp`](https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0473_pipeline.cpp) (Pipeline problem)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_c["C solutions"]
  node_c_archive["C problem archive"]
  node_c_bsearch["Binary search demo<br/>[0060_bsearch.c]"]
  node_c_drag["Bitwise XOR<br/>[0127_DRAGNXOR.c]"]
  node_c_bsearch_rand["Randomized search<br/>[0236_bsearch.c]"]
end

subgraph group_cpp["C++ solutions"]
  node_cpp_archive["C++ problem archive"]
  node_cpp_pipeline["Pipeline problem<br/>[0473_pipeline.cpp]"]
  node_cpp_query["String queries<br/>[0636_query.cpp]"]
  node_cpp_routes["Route search<br/>[1057_twoRoutes.cpp]"]
  node_cpp_bevarage["Beverage problem<br/>[0935_bevarage.cpp]"]
end

subgraph group_ib["InterviewBit solutions"]
  node_ib_archive["InterviewBit algorithms"]
  node_ib_rotated["Rotated search<br/>[searchRotated.cpp]"]
  node_ib_matrix["Matrix search<br/>[searchMatrix.cpp]"]
  node_ib_strings["String matching<br/>[stringSearch.cpp]"]
  node_ib_wordsearch["Word search<br/>[wordsearch.cpp]"]
  node_ib_tree["Tree conversion<br/>[BstToDll.cpp]"]
end

subgraph group_other["Other programs"]
  node_social["Social network demo"]
  node_java["Java example<br/>[HelloWorld.java]"]
  node_practice["ICPC practice"]
  node_euler["Project Euler"]
end

node_user(("Problem solver"))
node_results["Printed or returned result"]

node_user -->|"enters input"| node_c_bsearch
node_c_bsearch -->|"prints result"| node_results
node_user -->|"enters cases"| node_c_drag
node_c_drag -->|"prints result"| node_results
node_user -->|"enters query"| node_c_bsearch_rand
node_c_bsearch_rand -->|"prints result"| node_results
node_user -->|"enters input"| node_cpp_pipeline
node_cpp_pipeline -->|"prints result"| node_results
node_user -->|"enters queries"| node_cpp_query
node_cpp_query -->|"prints answers"| node_results
node_user -->|"enters graph"| node_cpp_routes
node_cpp_routes -->|"prints distance"| node_results
node_user -.->|"provides array"| node_ib_rotated
node_user -.->|"provides matrix"| node_ib_matrix
node_user -.->|"provides strings"| node_ib_strings
node_user -.->|"provides grid"| node_ib_wordsearch
node_ib_rotated -->|"returns index"| node_results
node_ib_matrix -->|"returns match"| node_results
node_ib_strings -->|"returns position"| node_results
node_ib_wordsearch -->|"returns match"| node_results
node_user -->|"provides tree"| node_ib_tree
node_ib_tree -->|"prints list"| node_results
node_user -.->|"uses features"| node_social
node_social -.->|"returns data"| node_results
node_user -.->|"selects solution"| node_cpp_archive
node_user -.->|"selects solution"| node_c_archive

click node_c_archive "https://github.com/tanmaysahay94/algorithm/tree/master/C"
click node_c_bsearch "https://github.com/tanmaysahay94/algorithm/blob/master/C/0060_bsearch.c"
click node_c_drag "https://github.com/tanmaysahay94/algorithm/blob/master/C/0127_DRAGNXOR.c"
click node_c_bsearch_rand "https://github.com/tanmaysahay94/algorithm/blob/master/C/0236_bsearch.c"
click node_cpp_archive "https://github.com/tanmaysahay94/algorithm/tree/master/CPP"
click node_cpp_pipeline "https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0473_pipeline.cpp"
click node_cpp_query "https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0636_query.cpp"
click node_cpp_routes "https://github.com/tanmaysahay94/algorithm/blob/master/CPP/1057_twoRoutes.cpp"
click node_cpp_bevarage "https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0935_bevarage.cpp"
click node_ib_archive "https://github.com/tanmaysahay94/algorithm/tree/master/interviewbit"
click node_ib_rotated "https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/binarysearch/searchRotated.cpp"
click node_ib_matrix "https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/binarysearch/searchMatrix.cpp"
click node_ib_strings "https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/strings/stringSearch.cpp"
click node_ib_wordsearch "https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/graphs/wordsearch.cpp"
click node_ib_tree "https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/trees/BstToDll.cpp"
click node_social "https://github.com/tanmaysahay94/algorithm/blob/master/PY/0257_socialNetwork.py"
click node_java "https://github.com/tanmaysahay94/algorithm/blob/master/JAVA/HelloWorld.java"
click node_practice "https://github.com/tanmaysahay94/algorithm/tree/master/icpcPractice"
click node_euler "https://github.com/tanmaysahay94/algorithm/tree/master/projectEuler"

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_c_archive,node_c_bsearch,node_c_drag,node_c_bsearch_rand toneBlue
class node_cpp_archive,node_cpp_pipeline,node_cpp_query,node_cpp_routes,node_cpp_bevarage toneAmber
class node_ib_archive,node_ib_rotated,node_ib_matrix,node_ib_strings,node_ib_wordsearch,node_ib_tree toneMint
class node_social,node_java,node_practice,node_euler toneRose
class node_user,node_results toneIndigo
```

## Components

### C solutions

- [C problem archive](https://github.com/tanmaysahay94/algorithm/tree/master/C): `C`
- [Binary search demo](https://github.com/tanmaysahay94/algorithm/blob/master/C/0060_bsearch.c): `C/0060_bsearch.c`
- [Bitwise XOR](https://github.com/tanmaysahay94/algorithm/blob/master/C/0127_DRAGNXOR.c): `C/0127_DRAGNXOR.c`
- [Randomized search](https://github.com/tanmaysahay94/algorithm/blob/master/C/0236_bsearch.c): `C/0236_bsearch.c`

### C++ solutions

- [C++ problem archive](https://github.com/tanmaysahay94/algorithm/tree/master/CPP): `CPP`
- [Pipeline problem](https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0473_pipeline.cpp): `CPP/0473_pipeline.cpp`
- [String queries](https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0636_query.cpp): `CPP/0636_query.cpp`
- [Route search](https://github.com/tanmaysahay94/algorithm/blob/master/CPP/1057_twoRoutes.cpp): `CPP/1057_twoRoutes.cpp`
- [Beverage problem](https://github.com/tanmaysahay94/algorithm/blob/master/CPP/0935_bevarage.cpp): `CPP/0935_bevarage.cpp`

### InterviewBit solutions

- [InterviewBit algorithms](https://github.com/tanmaysahay94/algorithm/tree/master/interviewbit): `interviewbit`
- [Rotated search](https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/binarysearch/searchRotated.cpp): `interviewbit/binarysearch/searchRotated.cpp`
- [Matrix search](https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/binarysearch/searchMatrix.cpp): `interviewbit/binarysearch/searchMatrix.cpp`
- [String matching](https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/strings/stringSearch.cpp): `interviewbit/strings/stringSearch.cpp`
- [Word search](https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/graphs/wordsearch.cpp): `interviewbit/graphs/wordsearch.cpp`
- [Tree conversion](https://github.com/tanmaysahay94/algorithm/blob/master/interviewbit/trees/BstToDll.cpp): `interviewbit/trees/BstToDll.cpp`

### Other programs

- [Social network demo](https://github.com/tanmaysahay94/algorithm/blob/master/PY/0257_socialNetwork.py): `PY/0257_socialNetwork.py`
- [Java example](https://github.com/tanmaysahay94/algorithm/blob/master/JAVA/HelloWorld.java): `JAVA/HelloWorld.java`
- [ICPC practice](https://github.com/tanmaysahay94/algorithm/tree/master/icpcPractice): `icpcPractice`
- [Project Euler](https://github.com/tanmaysahay94/algorithm/tree/master/projectEuler): `projectEuler`

### Other components

- **Problem solver**
- **Printed or returned result**

## Connections

- Problem solver → Binary search demo: enters input (evidence: `C/0060_bsearch.c`)
- Binary search demo → Printed or returned result: prints result (evidence: `C/0060_bsearch.c`)
- Problem solver → Bitwise XOR: enters cases (evidence: `C/0127_DRAGNXOR.c`)
- Bitwise XOR → Printed or returned result: prints result (evidence: `C/0127_DRAGNXOR.c`)
- Problem solver → Randomized search: enters query (evidence: `C/0236_bsearch.c`)
- Randomized search → Printed or returned result: prints result (evidence: `C/0236_bsearch.c`)
- Problem solver → Pipeline problem: enters input (evidence: `CPP/0473_pipeline.cpp`)
- Pipeline problem → Printed or returned result: prints result (evidence: `CPP/0473_pipeline.cpp`)
- Problem solver → String queries: enters queries (evidence: `CPP/0636_query.cpp`)
- String queries → Printed or returned result: prints answers (evidence: `CPP/0636_query.cpp`)
- Problem solver → Route search: enters graph (evidence: `CPP/1057_twoRoutes.cpp`)
- Route search → Printed or returned result: prints distance (evidence: `CPP/1057_twoRoutes.cpp`)
- Problem solver → Rotated search: provides array
- Problem solver → Matrix search: provides matrix
- Problem solver → String matching: provides strings
- Problem solver → Word search: provides grid
- Rotated search → Printed or returned result: returns index (evidence: `interviewbit/binarysearch/searchRotated.cpp`)
- Matrix search → Printed or returned result: returns match (evidence: `interviewbit/binarysearch/searchMatrix.cpp`)
- String matching → Printed or returned result: returns position (evidence: `interviewbit/strings/stringSearch.cpp`)
- Word search → Printed or returned result: returns match (evidence: `interviewbit/graphs/wordsearch.cpp`)
- Problem solver → Tree conversion: provides tree (evidence: `interviewbit/trees/BstToDll.cpp`)
- Tree conversion → Printed or returned result: prints list (evidence: `interviewbit/trees/BstToDll.cpp`)
- Problem solver → Social network demo: uses features
- Social network demo → Printed or returned result: returns data
- Problem solver → C++ problem archive: selects solution
- Problem solver → C problem archive: selects solution
