# kushal7820/kushal7820-dsa architecture

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

- Interactive diagram: https://gitdiagram.com/kushal7820/kushal7820-dsa
- Repository: https://github.com/kushal7820/kushal7820-dsa

## Overview

This repository is a portfolio of independent LeetCode solutions, not an integrated application: a learner selects a problem and studies or submits that problem’s standalone implementation. The README organizes problems by topic, while the source tree contains separate Python, C++, and Java solution files. The graph groups solutions by their primary problem domain; it does not imply calls or data flow between them. Source excerpts confirm several implementations, but many files were not sampled, so their specific algorithms are not inferred.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_numeric["Numeric problems"]
  node_palindrome_number["Palindrome number"]
  node_roman_integer["Roman to integer"]
  node_binary_add["Add binary<br/>[0067-add-binary.py]"]
  node_power_two["Power of two"]
  node_digit_product_sum["Digit product and sum"]
  node_reduce_zero["Steps to zero"]
end

subgraph group_arrays["Array problems"]
  node_remove_duplicates_array["Remove array duplicates"]
  node_remove_element["Remove array element"]
  node_merge_arrays["Merge sorted arrays"]
  node_longest_consecutive["Longest consecutive sequence"]
  node_majority_element["Majority element"]
  node_duplicate_number["Find duplicate number"]
  node_max_product["Maximum pair product"]
  node_running_sum["Running sum"]
  node_buy_chocolates["Buy two chocolates"]
end

subgraph group_strings["String problems"]
  node_common_prefix["Longest common prefix"]
  node_reverse_string["Reverse string"]
end

subgraph group_stacks["Stack problems"]
  node_valid_parentheses["Valid parentheses"]
  node_baseball_game["Baseball game"]
  node_adjacent_duplicates["Adjacent string duplicates"]
end

subgraph group_structures["Linked lists and trees"]
  node_add_numbers["Add two numbers"]
  node_list_binary["List to integer"]
  node_path_sum["Tree path sum<br/>[0112-path-sum.py]"]
end

node_learner(("Learner"))

click node_add_numbers "https://github.com/kushal7820/kushal7820-dsa/blob/main/0002-add-two-numbers/0002-add-two-numbers.cpp"
click node_list_binary "https://github.com/kushal7820/kushal7820-dsa/blob/main/1290-convert-binary-number-in-a-linked-list-to-integer/1290-convert-binary-number-in-a-linked-list-to-integer.java"
click node_path_sum "https://github.com/kushal7820/kushal7820-dsa/blob/main/0112-path-sum/0112-path-sum.py"
click node_palindrome_number "https://github.com/kushal7820/kushal7820-dsa/blob/main/0009-palindrome-number/0009-palindrome-number.py"
click node_roman_integer "https://github.com/kushal7820/kushal7820-dsa/blob/main/0013-roman-to-integer/0013-roman-to-integer.py"
click node_binary_add "https://github.com/kushal7820/kushal7820-dsa/blob/main/0067-add-binary/0067-add-binary.py"
click node_power_two "https://github.com/kushal7820/kushal7820-dsa/blob/main/0231-power-of-two/0231-power-of-two.java"
click node_digit_product_sum "https://github.com/kushal7820/kushal7820-dsa/blob/main/1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.java"
click node_reduce_zero "https://github.com/kushal7820/kushal7820-dsa/blob/main/1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.java"
click node_remove_duplicates_array "https://github.com/kushal7820/kushal7820-dsa/blob/main/0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java"
click node_remove_element "https://github.com/kushal7820/kushal7820-dsa/blob/main/0027-remove-element/0027-remove-element.py"
click node_merge_arrays "https://github.com/kushal7820/kushal7820-dsa/blob/main/0088-merge-sorted-array/0088-merge-sorted-array.py"
click node_longest_consecutive "https://github.com/kushal7820/kushal7820-dsa/blob/main/0128-longest-consecutive-sequence/0128-longest-consecutive-sequence.cpp"
click node_majority_element "https://github.com/kushal7820/kushal7820-dsa/blob/main/0169-majority-element/0169-majority-element.py"
click node_duplicate_number "https://github.com/kushal7820/kushal7820-dsa/blob/main/0287-find-the-duplicate-number/0287-find-the-duplicate-number.java"
click node_max_product "https://github.com/kushal7820/kushal7820-dsa/blob/main/1464-maximum-product-of-two-elements-in-an-array/1464-maximum-product-of-two-elements-in-an-array.java"
click node_running_sum "https://github.com/kushal7820/kushal7820-dsa/blob/main/1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.java"
click node_buy_chocolates "https://github.com/kushal7820/kushal7820-dsa/blob/main/2706-buy-two-chocolates/2706-buy-two-chocolates.java"
click node_common_prefix "https://github.com/kushal7820/kushal7820-dsa/blob/main/0014-longest-common-prefix/0014-longest-common-prefix.cpp"
click node_reverse_string "https://github.com/kushal7820/kushal7820-dsa/blob/main/0344-reverse-string/0344-reverse-string.java"
click node_valid_parentheses "https://github.com/kushal7820/kushal7820-dsa/blob/main/0020-valid-parentheses/0020-valid-parentheses.py"
click node_baseball_game "https://github.com/kushal7820/kushal7820-dsa/blob/main/0682-baseball-game/0682-baseball-game.java"
click node_adjacent_duplicates "https://github.com/kushal7820/kushal7820-dsa/blob/main/1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.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_palindrome_number,node_roman_integer,node_binary_add,node_power_two,node_digit_product_sum,node_reduce_zero toneBlue
class node_remove_duplicates_array,node_remove_element,node_merge_arrays,node_longest_consecutive,node_majority_element,node_duplicate_number,node_max_product,node_running_sum,node_buy_chocolates toneAmber
class node_common_prefix,node_reverse_string toneMint
class node_valid_parentheses,node_baseball_game,node_adjacent_duplicates toneRose
class node_add_numbers,node_list_binary,node_path_sum,node_learner toneIndigo
```

## Components

### Numeric problems

- [Palindrome number](https://github.com/kushal7820/kushal7820-dsa/blob/main/0009-palindrome-number/0009-palindrome-number.py): `0009-palindrome-number/0009-palindrome-number.py`
- [Roman to integer](https://github.com/kushal7820/kushal7820-dsa/blob/main/0013-roman-to-integer/0013-roman-to-integer.py): `0013-roman-to-integer/0013-roman-to-integer.py`
- [Add binary](https://github.com/kushal7820/kushal7820-dsa/blob/main/0067-add-binary/0067-add-binary.py): `0067-add-binary/0067-add-binary.py`
- [Power of two](https://github.com/kushal7820/kushal7820-dsa/blob/main/0231-power-of-two/0231-power-of-two.java): `0231-power-of-two/0231-power-of-two.java`
- [Digit product and sum](https://github.com/kushal7820/kushal7820-dsa/blob/main/1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.java): `1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.java`
- [Steps to zero](https://github.com/kushal7820/kushal7820-dsa/blob/main/1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.java): `1342-number-of-steps-to-reduce-a-number-to-zero/1342-number-of-steps-to-reduce-a-number-to-zero.java`

### Array problems

- [Remove array duplicates](https://github.com/kushal7820/kushal7820-dsa/blob/main/0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java): `0026-remove-duplicates-from-sorted-array/0026-remove-duplicates-from-sorted-array.java`
- [Remove array element](https://github.com/kushal7820/kushal7820-dsa/blob/main/0027-remove-element/0027-remove-element.py): `0027-remove-element/0027-remove-element.py`
- [Merge sorted arrays](https://github.com/kushal7820/kushal7820-dsa/blob/main/0088-merge-sorted-array/0088-merge-sorted-array.py): `0088-merge-sorted-array/0088-merge-sorted-array.py`
- [Longest consecutive sequence](https://github.com/kushal7820/kushal7820-dsa/blob/main/0128-longest-consecutive-sequence/0128-longest-consecutive-sequence.cpp): `0128-longest-consecutive-sequence/0128-longest-consecutive-sequence.cpp`
- [Majority element](https://github.com/kushal7820/kushal7820-dsa/blob/main/0169-majority-element/0169-majority-element.py): `0169-majority-element/0169-majority-element.py`
- [Find duplicate number](https://github.com/kushal7820/kushal7820-dsa/blob/main/0287-find-the-duplicate-number/0287-find-the-duplicate-number.java): `0287-find-the-duplicate-number/0287-find-the-duplicate-number.java`
- [Maximum pair product](https://github.com/kushal7820/kushal7820-dsa/blob/main/1464-maximum-product-of-two-elements-in-an-array/1464-maximum-product-of-two-elements-in-an-array.java): `1464-maximum-product-of-two-elements-in-an-array/1464-maximum-product-of-two-elements-in-an-array.java`
- [Running sum](https://github.com/kushal7820/kushal7820-dsa/blob/main/1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.java): `1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.java`
- [Buy two chocolates](https://github.com/kushal7820/kushal7820-dsa/blob/main/2706-buy-two-chocolates/2706-buy-two-chocolates.java): `2706-buy-two-chocolates/2706-buy-two-chocolates.java`

### String problems

- [Longest common prefix](https://github.com/kushal7820/kushal7820-dsa/blob/main/0014-longest-common-prefix/0014-longest-common-prefix.cpp): `0014-longest-common-prefix/0014-longest-common-prefix.cpp`
- [Reverse string](https://github.com/kushal7820/kushal7820-dsa/blob/main/0344-reverse-string/0344-reverse-string.java): `0344-reverse-string/0344-reverse-string.java`

### Stack problems

- [Valid parentheses](https://github.com/kushal7820/kushal7820-dsa/blob/main/0020-valid-parentheses/0020-valid-parentheses.py): `0020-valid-parentheses/0020-valid-parentheses.py`
- [Baseball game](https://github.com/kushal7820/kushal7820-dsa/blob/main/0682-baseball-game/0682-baseball-game.java): `0682-baseball-game/0682-baseball-game.java`
- [Adjacent string duplicates](https://github.com/kushal7820/kushal7820-dsa/blob/main/1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.java): `1047-remove-all-adjacent-duplicates-in-string/1047-remove-all-adjacent-duplicates-in-string.java`

### Linked lists and trees

- [Add two numbers](https://github.com/kushal7820/kushal7820-dsa/blob/main/0002-add-two-numbers/0002-add-two-numbers.cpp): `0002-add-two-numbers/0002-add-two-numbers.cpp`
- [List to integer](https://github.com/kushal7820/kushal7820-dsa/blob/main/1290-convert-binary-number-in-a-linked-list-to-integer/1290-convert-binary-number-in-a-linked-list-to-integer.java): `1290-convert-binary-number-in-a-linked-list-to-integer/1290-convert-binary-number-in-a-linked-list-to-integer.java`
- [Tree path sum](https://github.com/kushal7820/kushal7820-dsa/blob/main/0112-path-sum/0112-path-sum.py): `0112-path-sum/0112-path-sum.py`

### Other components

- **Learner**
