# vinosaravanan/javascript-dsa-problem-solving architecture

> Architecture diagram of the GitHub repository vinosaravanan/javascript-dsa-problem-solving, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vinosaravanan/javascript-dsa-problem-solving
- Repository: https://github.com/vinosaravanan/javascript-dsa-problem-solving

## Overview

#### Purpose and Runtime

This is a JavaScript ES6+/Node.js learning repository, not a cohesive deployed application. It contains standalone DSA exercises, demonstrations of array built-ins, and one runnable OOP banking-domain example. No external services, persistence layer, web framework, or infrastructure are represented in the tree.

#### Entry Points and Execution Model

Most files are independent scripts intended to be run directly with Node.js; there is no repository-wide application entry point. The clearest composed entry point is `oops/projects-In-oops/bank-account-oop/index.js`, which coordinates the banking classes. `package.json` defines the Node package boundary.

#### Array Algorithm Exercise Area

The `Array/` directory groups isolated solutions for common sequence operations: searching, deduplication, rotation, extrema, pairs, and byte/string conversion. Each file owns its own inputs and algorithm flow rather than importing a shared library.

Key examples:
- `Array/SearchTargetValueInArr.js`
- `Array/FindStartingAndEndingpositionGivenValue.js`
- `Array/RemoveDuplicatesInplace.js`

#### String Algorithm Exercise Area

The `String/` directory is an equivalent set of standalone text-processing exercises. The boundary is typically a string input transformed, inspected, or validated by one script; results are local rather than fed to other repository components.

Key examples:
- `String/ReverseString.js`
- `String/checkAnagramsStr.js`
- `String/PalindromeCheck.js`

#### Built-in Method Demonstrations

`Build-In-Methods/` isolates practice implementations centered on JavaScript collection APIs. These are educational alternatives to imperative loops and have no dependency on the DSA or OOP areas.

Core paths:
- `Build-In-Methods/Map.js`
- `Build-In-Methods/Filter.js`
- `Build-In-Methods/Reduce.js`

#### Banking OOP Project

The bank-account project is the repository’s primary multi-module domain model. `index.js` acts as the composition/control boundary: it constructs and exercises account, customer, and transaction objects. `BankAccount.js` encapsulates account state and banking operations; `Customer.js` represents account ownership/customer data; `Transaction.js` models transaction records or behavior.

Core paths:
- `oops/projects-In-oops/bank-account-oop/index.js`
- `oops/projects-In-oops/bank-account-oop/BankAccount.js`
- `oops/projects-In-oops/bank-account-oop/Customer.js`
- `oops/projects-In-oops/bank-account-oop/Transaction.js`

#### Primary Flows and Boundaries

Two architectural styles coexist:

1. **Exercise flow:** sample values → algorithm/method logic → console/result output, contained within one file under `Array/`, `String/`, or `Build-In-Methods/`.
2. **OOP flow:** `index.js` → construct customers/accounts → invoke account operations → create or record transactions. Class files form the domain boundary; the index script is the orchestration boundary.

The repository intentionally favors independent practice units over reusable shared abstractions, test suites, API endpoints, databases, or cross-module data pipelines.

Main entry points: [`oops/projects-In-oops/bank-account-oop/index.js`](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/index.js) (Banking Runner), [`oops/projects-In-oops/bank-account-oop/BankAccount.js`](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/BankAccount.js) (Bank Account), [`oops/projects-In-oops/bank-account-oop/Customer.js`](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Customer.js) (Customer), [`oops/projects-In-oops/bank-account-oop/Transaction.js`](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Transaction.js) (Transaction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_array["Array Exercises"]
  node_array_search["Search Target<br/>standalone algorithm"]
  node_array_range["Find Value Range<br/>standalone algorithm"]
  node_array_dedupe["Remove Duplicates<br/>standalone algorithm"]
end

subgraph group_string["String Exercises"]
  node_string_reverse["Reverse String<br/>standalone algorithm<br/>[ReverseString.js]"]
  node_string_anagram["Check Anagrams<br/>standalone algorithm"]
  node_string_palindrome["Palindrome Check<br/>standalone algorithm<br/>[PalindromeCheck.js]"]
end

subgraph group_builtins["Built-in Method Demos"]
  node_map_demo["Map Demo<br/>built-in demonstration<br/>[Map.js]"]
  node_filter_demo["Filter Demo<br/>built-in demonstration<br/>[Filter.js]"]
  node_reduce_demo["Reduce Demo<br/>built-in demonstration<br/>[Reduce.js]"]
end

subgraph group_banking["Banking OOP Project"]
  node_bank_index["Banking Runner<br/>Node.js entry script<br/>[index.js]"]
  node_customer["Customer<br/>domain class<br/>[Customer.js]"]
  node_account["Bank Account<br/>domain class<br/>[BankAccount.js]"]
  node_transaction["Transaction<br/>domain class<br/>[Transaction.js]"]
end

node_package["Node Package<br/>package boundary<br/>[package.json]"]
node_console(("Console Output<br/>local output"))

node_array_search -.->|"prints result"| node_console
node_array_range -.->|"prints result"| node_console
node_array_dedupe -.->|"prints result"| node_console
node_string_reverse -.->|"prints result"| node_console
node_string_anagram -.->|"prints result"| node_console
node_string_palindrome -.->|"prints result"| node_console
node_map_demo -.->|"prints result"| node_console
node_filter_demo -.->|"prints result"| node_console
node_reduce_demo -.->|"prints result"| node_console
node_bank_index -->|"constructs"| node_customer
node_bank_index -->|"constructs and operates"| node_account
node_bank_index -->|"creates or records"| node_transaction
node_account -->|"associates owner"| node_customer
node_account -->|"records activity"| node_transaction
node_bank_index -.->|"reports execution"| node_console

click node_package "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/package.json"
click node_array_search "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/SearchTargetValueInArr.js"
click node_array_range "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/FindStartingAndEndingpositionGivenValue.js"
click node_array_dedupe "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/RemoveDuplicatesInplace.js"
click node_string_reverse "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/ReverseString.js"
click node_string_anagram "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/checkAnagramsStr.js"
click node_string_palindrome "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/PalindromeCheck.js"
click node_map_demo "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Map.js"
click node_filter_demo "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Filter.js"
click node_reduce_demo "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Reduce.js"
click node_bank_index "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/index.js"
click node_customer "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Customer.js"
click node_account "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/BankAccount.js"
click node_transaction "https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Transaction.js"

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_array_search,node_array_range,node_array_dedupe toneBlue
class node_string_reverse,node_string_anagram,node_string_palindrome toneAmber
class node_map_demo,node_filter_demo,node_reduce_demo toneMint
class node_bank_index,node_customer,node_account,node_transaction toneRose
class node_package,node_console toneNeutral
```

## Components

### Array Exercises

Standalone sequence algorithm scripts.

- [Search Target](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/SearchTargetValueInArr.js): standalone algorithm · `Array/SearchTargetValueInArr.js`
- [Find Value Range](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/FindStartingAndEndingpositionGivenValue.js): standalone algorithm · `Array/FindStartingAndEndingpositionGivenValue.js`
- [Remove Duplicates](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Array/RemoveDuplicatesInplace.js): standalone algorithm · `Array/RemoveDuplicatesInplace.js`

### String Exercises

Standalone text-processing scripts.

- [Reverse String](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/ReverseString.js): standalone algorithm · `String/ReverseString.js`
- [Check Anagrams](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/checkAnagramsStr.js): standalone algorithm · `String/checkAnagramsStr.js`
- [Palindrome Check](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/String/PalindromeCheck.js): standalone algorithm · `String/PalindromeCheck.js`

### Built-in Method Demos

Independent JavaScript collection API demonstrations.

- [Map Demo](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Map.js): built-in demonstration · `Build-In-Methods/Map.js`
- [Filter Demo](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Filter.js): built-in demonstration · `Build-In-Methods/Filter.js`
- [Reduce Demo](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/Build-In-Methods/Reduce.js): built-in demonstration · `Build-In-Methods/Reduce.js`

### Banking OOP Project

Composable banking-domain example.

- [Banking Runner](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/index.js): Node.js entry script · Composes and exercises the banking domain. · `oops/projects-In-oops/bank-account-oop/index.js`
- [Customer](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Customer.js): domain class · Represents account ownership and customer data. · `oops/projects-In-oops/bank-account-oop/Customer.js`
- [Bank Account](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/BankAccount.js): domain class · Encapsulates account state and banking operations. · `oops/projects-In-oops/bank-account-oop/BankAccount.js`
- [Transaction](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/oops/projects-In-oops/bank-account-oop/Transaction.js): domain class · Models transaction records or behavior. · `oops/projects-In-oops/bank-account-oop/Transaction.js`

### Other components

- [Node Package](https://github.com/vinosaravanan/javascript-dsa-problem-solving/blob/main/package.json): package boundary · Defines the Node.js package boundary. · `package.json`
- **Console Output**: local output · Scripts report locally through Node.js output.

## Connections

- Search Target → Console Output: prints result
- Find Value Range → Console Output: prints result
- Remove Duplicates → Console Output: prints result
- Reverse String → Console Output: prints result
- Check Anagrams → Console Output: prints result
- Palindrome Check → Console Output: prints result
- Map Demo → Console Output: prints result
- Filter Demo → Console Output: prints result
- Reduce Demo → Console Output: prints result
- Banking Runner → Customer: constructs
- Banking Runner → Bank Account: constructs and operates
- Banking Runner → Transaction: creates or records
- Bank Account → Customer: associates owner
- Bank Account → Transaction: records activity
- Banking Runner → Console Output: reports execution
