# sanjay251206/sanjay-s-leetcode- architecture

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

- Interactive diagram: https://gitdiagram.com/sanjay251206/sanjay-s-leetcode-
- Repository: https://github.com/sanjay251206/sanjay-s-leetcode-

## Overview

This repository is a collection of independent Java LeetCode solutions, not a single application. The user-facing workflow is to select a problem’s `Solution` class, provide its expected input, and receive the computed result; there is no shared runtime entry point or cross-solution orchestration shown. Groups below organize the solutions by broad problem domain. The README describes the collection, while the sampled files show individual algorithms; no edges are drawn because no shared calls or runtime dispatch between components are evidenced.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Arrays and Collections"]
  node_squares["Sorted Squares"]
  node_pascal["Pascal Triangle"]
  node_mean["Trimmed Mean"]
  node_occurrences["Unique Occurrences"]
  node_difference["Array Differences"]
  node_double["Double Exists"]
  node_candies["Greatest Candies"]
  node_twosum["Two Sum II"]
  node_wealth["Customer Wealth"]
  node_altitude["Highest Altitude"]
  node_strictincrease["Strict Increase"]
  node_ranges["Summary Ranges"]
  node_concat["Array Concatenation"]
  node_removeelement["Remove Element"]
  node_zeroes["Move Zeroes<br/>[move-zeroes.java]"]
  node_duplicate["Find Duplicate"]
  node_pairs["Pair Sum Count"]
  node_missinginteger["Missing Integer"]
end

subgraph group_strings["Strings and Parsing"]
  node_reversewords["Reverse Words"]
  node_nesting["Parentheses Depth"]
  node_consistent["Consistent Strings"]
  node_anagram["Valid Anagram<br/>[valid-anagram.java]"]
  node_stars["Remove Stars"]
  node_substring["First String Match"]
  node_longestparen["Longest Valid Parentheses"]
end

subgraph group_structures["Lists and Trees"]
  node_sortlist["Sort List<br/>[sort-list.java]"]
  node_reverselist["Reverse List"]
end

subgraph group_math["Math and Search"]
  node_boomerang["Valid Boomerang"]
  node_stonegame["Stone Game IV<br/>[stone-game-iv.java]"]
  node_peak["Peak Element"]
  node_happy["Happy Number<br/>[happy-number.java]"]
  node_digitsdivide["Digits Divide Number"]
  node_board["Numbers on Board"]
  node_badversion["First Bad Version"]
end

click node_squares "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1019-squares-of-a-sorted-array/squares-of-a-sorted-array.java"
click node_boomerang "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1115-valid-boomerang/valid-boomerang.java"
click node_pascal "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/118-pascals-triangle/pascals-triangle.java"
click node_mean "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1210-mean-of-array-after-removing-some-elements/mean-of-array-after-removing-some-elements.java"
click node_occurrences "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1319-unique-number-of-occurrences/unique-number-of-occurrences.java"
click node_difference "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1392-find-the-difference-of-two-arrays/find-the-difference-of-two-arrays.java"
click node_double "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1468-check-if-n-and-its-double-exist/check-if-n-and-its-double-exist.java"
click node_sortlist "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/148-sort-list/sort-list.java"
click node_reversewords "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/151-reverse-words-in-a-string/reverse-words-in-a-string.java"
click node_candies "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1528-kids-with-the-greatest-number-of-candies/kids-with-the-greatest-number-of-candies.java"
click node_stonegame "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1617-stone-game-iv/stone-game-iv.java"
click node_peak "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/162-find-peak-element/find-peak-element.java"
click node_twosum "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.java"
click node_nesting "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1737-maximum-nesting-depth-of-the-parentheses/maximum-nesting-depth-of-the-parentheses.java"
click node_consistent "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1786-count-the-number-of-consistent-strings/count-the-number-of-consistent-strings.java"
click node_wealth "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1791-richest-customer-wealth/richest-customer-wealth.java"
click node_altitude "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1833-find-the-highest-altitude/find-the-highest-altitude.java"
click node_happy "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/202-happy-number/happy-number.java"
click node_strictincrease "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2020-remove-one-element-to-make-the-array-strictly-increasing/remove-one-element-to-make-the-array-strictly-increasing.java"
click node_reverselist "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/206-reverse-linked-list/reverse-linked-list.java"
click node_ranges "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/228-summary-ranges/summary-ranges.java"
click node_anagram "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/242-valid-anagram/valid-anagram.java"
click node_stars "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2470-removing-stars-from-a-string/removing-stars-from-a-string.java"
click node_digitsdivide "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2608-count-the-digits-that-divide-a-number/count-the-digits-that-divide-a-number.java"
click node_board "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2679-count-distinct-numbers-on-board/count-distinct-numbers-on-board.java"
click node_concat "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2698-find-the-array-concatenation-value/find-the-array-concatenation-value.java"
click node_removeelement "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/27-remove-element/remove-element.java"
click node_badversion "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/278-first-bad-version/first-bad-version.java"
click node_substring "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/28-find-the-index-of-the-first-occurrence-in-a-string/find-the-index-of-the-first-occurrence-in-a-string.java"
click node_zeroes "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/283-move-zeroes/move-zeroes.java"
click node_duplicate "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/287-find-the-duplicate-number/find-the-duplicate-number.java"
click node_pairs "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2917-count-pairs-whose-sum-is-less-than-target/count-pairs-whose-sum-is-less-than-target.java"
click node_longestparen "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/32-longest-valid-parentheses/longest-valid-parentheses.java"
click node_missinginteger "https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/3236-smallest-missing-integer-greater-than-sequential-prefix-sum/smallest-missing-integer-greater-than-sequential-prefix-sum.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_squares,node_pascal,node_mean,node_occurrences,node_difference,node_double,node_candies,node_twosum,node_wealth,node_altitude,node_strictincrease,node_ranges,node_concat,node_removeelement,node_zeroes,node_duplicate,node_pairs,node_missinginteger toneBlue
class node_reversewords,node_nesting,node_consistent,node_anagram,node_stars,node_substring,node_longestparen toneAmber
class node_sortlist,node_reverselist toneMint
class node_boomerang,node_stonegame,node_peak,node_happy,node_digitsdivide,node_board,node_badversion toneRose
```

## Components

### Arrays and Collections

- [Sorted Squares](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1019-squares-of-a-sorted-array/squares-of-a-sorted-array.java): `1019-squares-of-a-sorted-array/squares-of-a-sorted-array.java`
- [Pascal Triangle](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/118-pascals-triangle/pascals-triangle.java): `118-pascals-triangle/pascals-triangle.java`
- [Trimmed Mean](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1210-mean-of-array-after-removing-some-elements/mean-of-array-after-removing-some-elements.java): `1210-mean-of-array-after-removing-some-elements/mean-of-array-after-removing-some-elements.java`
- [Unique Occurrences](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1319-unique-number-of-occurrences/unique-number-of-occurrences.java): `1319-unique-number-of-occurrences/unique-number-of-occurrences.java`
- [Array Differences](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1392-find-the-difference-of-two-arrays/find-the-difference-of-two-arrays.java): `1392-find-the-difference-of-two-arrays/find-the-difference-of-two-arrays.java`
- [Double Exists](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1468-check-if-n-and-its-double-exist/check-if-n-and-its-double-exist.java): `1468-check-if-n-and-its-double-exist/check-if-n-and-its-double-exist.java`
- [Greatest Candies](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1528-kids-with-the-greatest-number-of-candies/kids-with-the-greatest-number-of-candies.java): `1528-kids-with-the-greatest-number-of-candies/kids-with-the-greatest-number-of-candies.java`
- [Two Sum II](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.java): `167-two-sum-ii-input-array-is-sorted/two-sum-ii-input-array-is-sorted.java`
- [Customer Wealth](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1791-richest-customer-wealth/richest-customer-wealth.java): `1791-richest-customer-wealth/richest-customer-wealth.java`
- [Highest Altitude](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1833-find-the-highest-altitude/find-the-highest-altitude.java): `1833-find-the-highest-altitude/find-the-highest-altitude.java`
- [Strict Increase](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2020-remove-one-element-to-make-the-array-strictly-increasing/remove-one-element-to-make-the-array-strictly-increasing.java): `2020-remove-one-element-to-make-the-array-strictly-increasing/remove-one-element-to-make-the-array-strictly-increasing.java`
- [Summary Ranges](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/228-summary-ranges/summary-ranges.java): `228-summary-ranges/summary-ranges.java`
- [Array Concatenation](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2698-find-the-array-concatenation-value/find-the-array-concatenation-value.java): `2698-find-the-array-concatenation-value/find-the-array-concatenation-value.java`
- [Remove Element](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/27-remove-element/remove-element.java): `27-remove-element/remove-element.java`
- [Move Zeroes](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/283-move-zeroes/move-zeroes.java): `283-move-zeroes/move-zeroes.java`
- [Find Duplicate](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/287-find-the-duplicate-number/find-the-duplicate-number.java): `287-find-the-duplicate-number/find-the-duplicate-number.java`
- [Pair Sum Count](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2917-count-pairs-whose-sum-is-less-than-target/count-pairs-whose-sum-is-less-than-target.java): `2917-count-pairs-whose-sum-is-less-than-target/count-pairs-whose-sum-is-less-than-target.java`
- [Missing Integer](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/3236-smallest-missing-integer-greater-than-sequential-prefix-sum/smallest-missing-integer-greater-than-sequential-prefix-sum.java): `3236-smallest-missing-integer-greater-than-sequential-prefix-sum/smallest-missing-integer-greater-than-sequential-prefix-sum.java`

### Strings and Parsing

- [Reverse Words](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/151-reverse-words-in-a-string/reverse-words-in-a-string.java): `151-reverse-words-in-a-string/reverse-words-in-a-string.java`
- [Parentheses Depth](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1737-maximum-nesting-depth-of-the-parentheses/maximum-nesting-depth-of-the-parentheses.java): `1737-maximum-nesting-depth-of-the-parentheses/maximum-nesting-depth-of-the-parentheses.java`
- [Consistent Strings](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1786-count-the-number-of-consistent-strings/count-the-number-of-consistent-strings.java): `1786-count-the-number-of-consistent-strings/count-the-number-of-consistent-strings.java`
- [Valid Anagram](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/242-valid-anagram/valid-anagram.java): `242-valid-anagram/valid-anagram.java`
- [Remove Stars](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2470-removing-stars-from-a-string/removing-stars-from-a-string.java): `2470-removing-stars-from-a-string/removing-stars-from-a-string.java`
- [First String Match](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/28-find-the-index-of-the-first-occurrence-in-a-string/find-the-index-of-the-first-occurrence-in-a-string.java): `28-find-the-index-of-the-first-occurrence-in-a-string/find-the-index-of-the-first-occurrence-in-a-string.java`
- [Longest Valid Parentheses](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/32-longest-valid-parentheses/longest-valid-parentheses.java): `32-longest-valid-parentheses/longest-valid-parentheses.java`

### Lists and Trees

- [Sort List](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/148-sort-list/sort-list.java): `148-sort-list/sort-list.java`
- [Reverse List](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/206-reverse-linked-list/reverse-linked-list.java): `206-reverse-linked-list/reverse-linked-list.java`

### Math and Search

- [Valid Boomerang](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1115-valid-boomerang/valid-boomerang.java): `1115-valid-boomerang/valid-boomerang.java`
- [Stone Game IV](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/1617-stone-game-iv/stone-game-iv.java): `1617-stone-game-iv/stone-game-iv.java`
- [Peak Element](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/162-find-peak-element/find-peak-element.java): `162-find-peak-element/find-peak-element.java`
- [Happy Number](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/202-happy-number/happy-number.java): `202-happy-number/happy-number.java`
- [Digits Divide Number](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2608-count-the-digits-that-divide-a-number/count-the-digits-that-divide-a-number.java): `2608-count-the-digits-that-divide-a-number/count-the-digits-that-divide-a-number.java`
- [Numbers on Board](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/2679-count-distinct-numbers-on-board/count-distinct-numbers-on-board.java): `2679-count-distinct-numbers-on-board/count-distinct-numbers-on-board.java`
- [First Bad Version](https://github.com/sanjay251206/sanjay-s-leetcode-/blob/main/278-first-bad-version/first-bad-version.java): `278-first-bad-version/first-bad-version.java`
