# mandliya/algorithms_and_data_structures architecture

> Architecture diagram of the GitHub repository mandliya/algorithms_and_data_structures, 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/mandliya/algorithms_and_data_structures
- Repository: https://github.com/mandliya/algorithms_and_data_structures

## Overview

This is a data-structures-and-algorithms learning repository: its principal workflow is to inspect or run an individual problem solution and observe the computed result. The solutions are mostly independent examples, not stages in a shared application pipeline. The README also documents reusable data-structure and algorithm headers. The graph groups representative problem areas and those reusable implementations; links are limited to relationships shown in the README or sampled source. Many listed problem files were not sampled, so their internal dependencies are not asserted.

Main entry points: [`queue_problems/queueDemo.cpp`](https://github.com/mandliya/algorithms_and_data_structures/blob/master/queue_problems/queueDemo.cpp) (Queue demonstration), [`include/impl/binarySearchTree.impl.h`](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/impl/binarySearchTree.impl.h) (Binary search tree), [`include/generic.h`](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/generic.h) (Generic helpers), [`tree_problems/binarySearchTreeDemo.cpp`](https://github.com/mandliya/algorithms_and_data_structures/blob/master/tree_problems/binarySearchTreeDemo.cpp) (BST demonstration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_problem_solutions["Problem solutions"]
  node_linked_list["Linked-list problems"]
  node_coding_interview["Interview problems"]
  node_leetcode["LeetCode problems<br/>[median_stream.cpp]"]
  node_bit_manipulation["Bit manipulation"]
  node_dynamic_programming["Dynamic programming"]
  node_backtracking["Backtracking problems<br/>[word_search.cpp]"]
  node_math_problems["Math problems<br/>[phone_digits.cpp]"]
  node_string_problems["String problems"]
end

subgraph group_graph_algorithms["Graph and search"]
  node_sorting_search["Sort and search"]
  node_graph_problems["Graph problems"]
  node_tree_problems["Tree problems<br/>[floor_ceil_bst.cpp]"]
end

subgraph group_core_structures["Reusable structures"]
  node_queue_demo["Queue demonstration<br/>[queueDemo.cpp]"]
  node_queue_impl["Generic queue<br/>[queue.h]"]
  node_list_impl["Generic list<br/>[list.h]"]
  node_bst_impl["Binary search tree"]
  node_bst_demo["BST demonstration"]
end

subgraph group_core_algorithms["Reusable algorithms"]
  node_generic_helpers["Generic helpers<br/>[generic.h]"]
  node_sorting_headers["Sorting headers<br/>[mergeSort.h]"]
  node_graph_header["Graph implementation<br/>[graph.h]"]
end

node_learner(("Learner"))

node_queue_demo -->|"uses queue"| node_queue_impl
node_queue_demo -->|"generates values"| node_generic_helpers
node_bst_demo -->|"demonstrates tree"| node_bst_impl
node_bst_impl -->|"uses swap"| node_generic_helpers
node_learner -->|"studies solutions"| node_linked_list
node_learner -->|"studies solutions"| node_bit_manipulation
node_learner -->|"runs example"| node_queue_demo

click node_linked_list "https://github.com/mandliya/algorithms_and_data_structures/blob/master/linked_list_problems/listPallindrome.cpp"
click node_coding_interview "https://github.com/mandliya/algorithms_and_data_structures/blob/master/cracking_the_coding_interview_problems/1-3-edi5-removeDuplicates.cpp"
click node_leetcode "https://github.com/mandliya/algorithms_and_data_structures/blob/master/leet_code_problems/median_stream.cpp"
click node_bit_manipulation "https://github.com/mandliya/algorithms_and_data_structures/blob/master/bit_manipulation/reverseBitsOfAnInteger.cpp"
click node_dynamic_programming "https://github.com/mandliya/algorithms_and_data_structures/blob/master/dynamic_programming_problems/0_1_knapsack_problem.cpp"
click node_backtracking "https://github.com/mandliya/algorithms_and_data_structures/blob/master/backtracking_problems/word_search.cpp"
click node_math_problems "https://github.com/mandliya/algorithms_and_data_structures/blob/master/math_problems/phone_digits.cpp"
click node_string_problems "https://github.com/mandliya/algorithms_and_data_structures/blob/master/string_problems/robinKarpStringMatching.cpp"
click node_sorting_search "https://github.com/mandliya/algorithms_and_data_structures/blob/master/sort_search_problems/first_occurrence_binary_search.cpp"
click node_graph_problems "https://github.com/mandliya/algorithms_and_data_structures/blob/master/graph_problems/dijkstra-shortest-reach.cpp"
click node_tree_problems "https://github.com/mandliya/algorithms_and_data_structures/blob/master/tree_problems/floor_ceil_bst.cpp"
click node_queue_demo "https://github.com/mandliya/algorithms_and_data_structures/blob/master/queue_problems/queueDemo.cpp"
click node_queue_impl "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/queue.h"
click node_list_impl "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/list.h"
click node_bst_impl "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/impl/binarySearchTree.impl.h"
click node_bst_demo "https://github.com/mandliya/algorithms_and_data_structures/blob/master/tree_problems/binarySearchTreeDemo.cpp"
click node_generic_helpers "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/generic.h"
click node_sorting_headers "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/mergeSort.h"
click node_graph_header "https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/graph.h"

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_linked_list,node_coding_interview,node_leetcode,node_bit_manipulation,node_dynamic_programming,node_backtracking,node_math_problems,node_string_problems toneBlue
class node_sorting_search,node_graph_problems,node_tree_problems toneAmber
class node_queue_demo,node_queue_impl,node_list_impl,node_bst_impl,node_bst_demo toneMint
class node_generic_helpers,node_sorting_headers,node_graph_header toneRose
class node_learner toneIndigo
```

## Components

### Problem solutions

- [Linked-list problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/linked_list_problems/listPallindrome.cpp): `linked_list_problems/listPallindrome.cpp`
- [Interview problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/cracking_the_coding_interview_problems/1-3-edi5-removeDuplicates.cpp): `cracking_the_coding_interview_problems/1-3-edi5-removeDuplicates.cpp`
- [LeetCode problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/leet_code_problems/median_stream.cpp): `leet_code_problems/median_stream.cpp`
- [Bit manipulation](https://github.com/mandliya/algorithms_and_data_structures/blob/master/bit_manipulation/reverseBitsOfAnInteger.cpp): `bit_manipulation/reverseBitsOfAnInteger.cpp`
- [Dynamic programming](https://github.com/mandliya/algorithms_and_data_structures/blob/master/dynamic_programming_problems/0_1_knapsack_problem.cpp): `dynamic_programming_problems/0_1_knapsack_problem.cpp`
- [Backtracking problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/backtracking_problems/word_search.cpp): `backtracking_problems/word_search.cpp`
- [Math problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/math_problems/phone_digits.cpp): `math_problems/phone_digits.cpp`
- [String problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/string_problems/robinKarpStringMatching.cpp): `string_problems/robinKarpStringMatching.cpp`

### Graph and search

- [Sort and search](https://github.com/mandliya/algorithms_and_data_structures/blob/master/sort_search_problems/first_occurrence_binary_search.cpp): `sort_search_problems/first_occurrence_binary_search.cpp`
- [Graph problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/graph_problems/dijkstra-shortest-reach.cpp): `graph_problems/dijkstra-shortest-reach.cpp`
- [Tree problems](https://github.com/mandliya/algorithms_and_data_structures/blob/master/tree_problems/floor_ceil_bst.cpp): `tree_problems/floor_ceil_bst.cpp`

### Reusable structures

- [Queue demonstration](https://github.com/mandliya/algorithms_and_data_structures/blob/master/queue_problems/queueDemo.cpp): `queue_problems/queueDemo.cpp`
- [Generic queue](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/queue.h): `include/queue.h`
- [Generic list](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/list.h): `include/list.h`
- [Binary search tree](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/impl/binarySearchTree.impl.h): `include/impl/binarySearchTree.impl.h`
- [BST demonstration](https://github.com/mandliya/algorithms_and_data_structures/blob/master/tree_problems/binarySearchTreeDemo.cpp): `tree_problems/binarySearchTreeDemo.cpp`

### Reusable algorithms

- [Generic helpers](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/generic.h): `include/generic.h`
- [Sorting headers](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/mergeSort.h): `include/mergeSort.h`
- [Graph implementation](https://github.com/mandliya/algorithms_and_data_structures/blob/master/include/graph.h): `include/graph.h`

### Other components

- **Learner**

## Connections

- Queue demonstration → Generic queue: uses queue (evidence: `queue_problems/queueDemo.cpp`)
- Queue demonstration → Generic helpers: generates values (evidence: `queue_problems/queueDemo.cpp`)
- BST demonstration → Binary search tree: demonstrates tree (evidence: `tree_problems/binarySearchTreeDemo.cpp`)
- Binary search tree → Generic helpers: uses swap (evidence: `include/impl/binarySearchTree.impl.h`)
- Learner → Linked-list problems: studies solutions (evidence: `README.md`)
- Learner → Bit manipulation: studies solutions (evidence: `README.md`)
- Learner → Queue demonstration: runs example (evidence: `README.md`)
