# hareesh-r/data-structures-and-algorithms-dsa-in-java architecture

> Architecture diagram of the GitHub repository hareesh-r/data-structures-and-algorithms-dsa-in-java, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hareesh-r/data-structures-and-algorithms-dsa-in-java
- Repository: https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java

## Overview

This is a small collection of independent Java console examples, not a shared application. Each program reads input and demonstrates one algorithm or operation: HCF, digit counting, primality enumeration, set-bit counting, kth-bit testing, or sorting. The excerpts show no calls between these files or shared runtime layer; edges represent only their console interaction.

Main entry points: [`HCF.java`](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/HCF.java) (HCF), [`NumberOfDigits.java`](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfDigits.java) (Digit counting), [`PrimeNumber.java`](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/PrimeNumber.java) (Prime enumeration), [`NumberOfSetBits.java`](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfSetBits.java) (Set-bit count)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_console_user(("Console user"))
node_hcf["HCF<br/>[HCF.java]"]
node_digit_count["Digit counting"]
node_prime["Prime enumeration<br/>[PrimeNumber.java]"]
node_set_bits["Set-bit count"]
node_kth_bit["Kth-bit test"]
node_turbo_sort["Turbo sort<br/>[turboSort.java]"]

node_console_user -->|"enters integers"| node_hcf
node_hcf -->|"prints HCF"| node_console_user
node_console_user -->|"enters values"| node_digit_count
node_digit_count -->|"prints counts"| node_console_user
node_console_user -->|"enters limit"| node_prime
node_prime -->|"prints primes"| node_console_user
node_console_user -->|"enters integer"| node_set_bits
node_set_bits -->|"prints count"| node_console_user
node_console_user -->|"enters integer and k"| node_kth_bit
node_kth_bit -->|"prints result"| node_console_user
node_console_user -->|"enters values"| node_turbo_sort
node_turbo_sort -->|"prints sorted values"| node_console_user

click node_hcf "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/HCF.java"
click node_digit_count "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfDigits.java"
click node_prime "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/PrimeNumber.java"
click node_set_bits "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfSetBits.java"
click node_kth_bit "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/KthBitTrueOrFalse.java"
click node_turbo_sort "https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/turboSort.java"

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_console_user toneBlue
class node_hcf,node_digit_count,node_prime,node_set_bits,node_kth_bit,node_turbo_sort toneTeal
```

## Components

### Other components

- **Console user**
- [HCF](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/HCF.java): `HCF.java`
- [Digit counting](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfDigits.java): `NumberOfDigits.java`
- [Prime enumeration](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/PrimeNumber.java): `PrimeNumber.java`
- [Set-bit count](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/NumberOfSetBits.java): `NumberOfSetBits.java`
- [Kth-bit test](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/KthBitTrueOrFalse.java): `KthBitTrueOrFalse.java`
- [Turbo sort](https://github.com/hareesh-r/data-structures-and-algorithms-dsa-in-java/blob/main/turboSort.java): `turboSort.java`

## Connections

- Console user → HCF: enters integers (evidence: `HCF.java`)
- HCF → Console user: prints HCF (evidence: `HCF.java`)
- Console user → Digit counting: enters values (evidence: `NumberOfDigits.java`)
- Digit counting → Console user: prints counts (evidence: `NumberOfDigits.java`)
- Console user → Prime enumeration: enters limit (evidence: `PrimeNumber.java`)
- Prime enumeration → Console user: prints primes (evidence: `PrimeNumber.java`)
- Console user → Set-bit count: enters integer (evidence: `NumberOfSetBits.java`)
- Set-bit count → Console user: prints count (evidence: `NumberOfSetBits.java`)
- Console user → Kth-bit test: enters integer and k (evidence: `KthBitTrueOrFalse.java`)
- Kth-bit test → Console user: prints result (evidence: `KthBitTrueOrFalse.java`)
- Console user → Turbo sort: enters values (evidence: `turboSort.java`)
- Turbo sort → Console user: prints sorted values (evidence: `turboSort.java`)
