# pratikyadav-dev/private architecture

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

## Overview

This repository is a collection of standalone Python solutions to coding problems, not a single application. Its principal use is to select a problem’s file, provide the expected inputs to its class or function, and receive a computed answer. The tree and README organize exercises around prefix sums, sliding windows, and two pointers, alongside daily questions, random problems, and contest problems. Each solution implements its own algorithm; the available evidence shows no shared runtime, storage, or calls between solutions.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prefix["Prefix Sum"]
  node_p1480["Running Sum"]
  node_p2270["Split Array Ways"]
  node_p238["Product Except Self"]
  node_p2574["Left Right Differences"]
  node_p303["Range Sum Query"]
  node_p560["Subarray Sum K"]
  node_p724["Pivot Index"]
end

subgraph group_window["Sliding Window"]
  node_w1004["Max Consecutive Ones III"]
  node_w1343["Subarray Average Threshold"]
  node_w1423["Card Points"]
  node_w1456["Max Vowels"]
  node_w209["Minimum Size Subarray"]
  node_w219["Duplicate Within Distance"]
  node_w239["Sliding Window Maximum"]
  node_w2461["Distinct Subarray Sum"]
  node_w3["Longest Unique Substring"]
  node_w438["Find Anagrams"]
  node_w485["Max Consecutive Ones"]
  node_w567["String Permutation"]
  node_w643["Maximum Average"]
  node_w713["Subarray Product Limit"]
  node_w904["Fruit Baskets"]
end

subgraph group_twopointer["Two Pointer"]
  node_t151["Reverse Words"]
  node_t4sum["4Sum<br/>[18 4Sum.py]"]
  node_t524["Longest Dictionary Word"]
  node_t611["Valid Triangle Count"]
  node_t80["Remove Sorted Duplicates"]
  node_t905["Sort by Parity"]
  node_t922["Sort by Parity II"]
end

subgraph group_daily["Daily Questions"]
  node_d2243["Digit Sum String"]
  node_d3105["Monotonic Subarray"]
  node_d3364["Minimum Positive Sum"]
end

subgraph group_other["Other Exercises"]
  node_r1385["Distance Value"]
  node_r154["Rotated Array Minimum"]
end

click node_p1480 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/1480.%20Running%20Sum%20of%201d%20Array.py"
click node_p2270 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/2270.%20Number%20of%20Ways%20to%20Split%20Array.py"
click node_p238 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/238.%20Product%20of%20Array%20Except%20Self.py"
click node_p2574 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/2574.%20Left%20and%20Right%20Sum%20Differences.py"
click node_p303 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/303.%20Range%20Sum%20Query%20-%20Immutable.py"
click node_p560 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/560.%20Subarray%20Sum%20Equals%20K.py"
click node_p724 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/724.%20Find%20Pivot%20Index.py"
click node_w1004 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1004.%20Max%20Consecutive%20Ones%20III.py"
click node_w1343 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1343.%20Number%20of%20Sub-arrays%20of%20Size%20K%20and%20Average%20Greater%20than%20or%20Equal%20to%20Threshold.py"
click node_w1423 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1423.%20Maximum%20Points%20You%20Can%20Obtain%20from%20Cards.py"
click node_w1456 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1456.%20Maximum%20Number%20of%20Vowels%20in%20a%20Substring%20of%20Given%20Length.py"
click node_w209 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/209.%20Minimum%20Size%20Subarray%20Sum.py"
click node_w219 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/219.%20Contains%20Duplicate%20II.py"
click node_w239 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/239.%20Sliding%20Window%20Maximum.py"
click node_w2461 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/2461.%20Maximum%20Sum%20of%20Distinct%20Subarrays%20With%20Length%20K.py"
click node_w3 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/3.%20Longest%20Substring%20Without%20Repeating%20Characters.py"
click node_w438 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/438.%20Find%20All%20Anagrams%20in%20a%20String.py"
click node_w485 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/485.%20Max%20Consecutive%20Ones.py"
click node_w567 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/567.%20Permutation%20in%20String.py"
click node_w643 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/643.%20Maximum%20Average%20Subarray%20I.py"
click node_w713 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/713.%20Subarray%20Product%20Less%20Than%20K.py"
click node_w904 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/904.%20Fruit%20Into%20Baskets.py"
click node_t151 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/151.%20Reverse%20Words%20in%20a%20String.py"
click node_t4sum "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/18%20%20%20%204Sum.py"
click node_t524 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/524.%20Longest%20Word%20in%20Dictionary%20through%20Deleting.py"
click node_t611 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/611%20Valid%20Triangle%20Number.py"
click node_t80 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/80.%20Remove%20Duplicates%20from%20Sorted%20Array%20II.py"
click node_t905 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/905.%20Sort%20Array%20By%20Parity.py"
click node_t922 "https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/922.%20Sort%20Array%20By%20Parity%20II.py"
click node_d2243 "https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/2243.%20Calculate%20Digit%20Sum%20of%20a%20String.py"
click node_d3105 "https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/3105.%20Longest%20Strictly%20Increasing%20or%20Strictly%20Decreasing%20Subarray.py"
click node_d3364 "https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/3364.%20Minimum%20Positive%20Sum%20Subarray%20.py"
click node_r1385 "https://github.com/pratikyadav-dev/private/blob/main/Random/1385.%20Find%20the%20Distance%20Value%20Between%20Two%20Arrays.py"
click node_r154 "https://github.com/pratikyadav-dev/private/blob/main/Random/154.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II.py"

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_p1480,node_p2270,node_p238,node_p2574,node_p303,node_p560,node_p724 toneBlue
class node_w1004,node_w1343,node_w1423,node_w1456,node_w209,node_w219,node_w239,node_w2461,node_w3,node_w438,node_w485,node_w567,node_w643,node_w713,node_w904 toneAmber
class node_t151,node_t4sum,node_t524,node_t611,node_t80,node_t905,node_t922 toneMint
class node_d2243,node_d3105,node_d3364 toneRose
class node_r1385,node_r154 toneIndigo
```

## Components

### Prefix Sum

- [Running Sum](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/1480.%20Running%20Sum%20of%201d%20Array.py): `Arrays/Prefix sum/1480. Running Sum of 1d Array.py`
- [Split Array Ways](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/2270.%20Number%20of%20Ways%20to%20Split%20Array.py): `Arrays/Prefix sum/2270. Number of Ways to Split Array.py`
- [Product Except Self](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/238.%20Product%20of%20Array%20Except%20Self.py): `Arrays/Prefix sum/238. Product of Array Except Self.py`
- [Left Right Differences](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/2574.%20Left%20and%20Right%20Sum%20Differences.py): `Arrays/Prefix sum/2574. Left and Right Sum Differences.py`
- [Range Sum Query](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/303.%20Range%20Sum%20Query%20-%20Immutable.py): `Arrays/Prefix sum/303. Range Sum Query - Immutable.py`
- [Subarray Sum K](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/560.%20Subarray%20Sum%20Equals%20K.py): `Arrays/Prefix sum/560. Subarray Sum Equals K.py`
- [Pivot Index](https://github.com/pratikyadav-dev/private/blob/main/Arrays/Prefix%20sum/724.%20Find%20Pivot%20Index.py): `Arrays/Prefix sum/724. Find Pivot Index.py`

### Sliding Window

- [Max Consecutive Ones III](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1004.%20Max%20Consecutive%20Ones%20III.py): `Arrays/sliding window/1004. Max Consecutive Ones III.py`
- [Subarray Average Threshold](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1343.%20Number%20of%20Sub-arrays%20of%20Size%20K%20and%20Average%20Greater%20than%20or%20Equal%20to%20Threshold.py): `Arrays/sliding window/1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold.py`
- [Card Points](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1423.%20Maximum%20Points%20You%20Can%20Obtain%20from%20Cards.py): `Arrays/sliding window/1423. Maximum Points You Can Obtain from Cards.py`
- [Max Vowels](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/1456.%20Maximum%20Number%20of%20Vowels%20in%20a%20Substring%20of%20Given%20Length.py): `Arrays/sliding window/1456. Maximum Number of Vowels in a Substring of Given Length.py`
- [Minimum Size Subarray](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/209.%20Minimum%20Size%20Subarray%20Sum.py): `Arrays/sliding window/209. Minimum Size Subarray Sum.py`
- [Duplicate Within Distance](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/219.%20Contains%20Duplicate%20II.py): `Arrays/sliding window/219. Contains Duplicate II.py`
- [Sliding Window Maximum](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/239.%20Sliding%20Window%20Maximum.py): `Arrays/sliding window/239. Sliding Window Maximum.py`
- [Distinct Subarray Sum](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/2461.%20Maximum%20Sum%20of%20Distinct%20Subarrays%20With%20Length%20K.py): `Arrays/sliding window/2461. Maximum Sum of Distinct Subarrays With Length K.py`
- [Longest Unique Substring](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/3.%20Longest%20Substring%20Without%20Repeating%20Characters.py): `Arrays/sliding window/3. Longest Substring Without Repeating Characters.py`
- [Find Anagrams](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/438.%20Find%20All%20Anagrams%20in%20a%20String.py): `Arrays/sliding window/438. Find All Anagrams in a String.py`
- [Max Consecutive Ones](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/485.%20Max%20Consecutive%20Ones.py): `Arrays/sliding window/485. Max Consecutive Ones.py`
- [String Permutation](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/567.%20Permutation%20in%20String.py): `Arrays/sliding window/567. Permutation in String.py`
- [Maximum Average](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/643.%20Maximum%20Average%20Subarray%20I.py): `Arrays/sliding window/643. Maximum Average Subarray I.py`
- [Subarray Product Limit](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/713.%20Subarray%20Product%20Less%20Than%20K.py): `Arrays/sliding window/713. Subarray Product Less Than K.py`
- [Fruit Baskets](https://github.com/pratikyadav-dev/private/blob/main/Arrays/sliding%20window/904.%20Fruit%20Into%20Baskets.py): `Arrays/sliding window/904. Fruit Into Baskets.py`

### Two Pointer

- [Reverse Words](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/151.%20Reverse%20Words%20in%20a%20String.py): `Arrays/two pointer/151. Reverse Words in a String.py`
- [4Sum](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/18%20%20%20%204Sum.py): `Arrays/two pointer/18 4Sum.py`
- [Longest Dictionary Word](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/524.%20Longest%20Word%20in%20Dictionary%20through%20Deleting.py): `Arrays/two pointer/524. Longest Word in Dictionary through Deleting.py`
- [Valid Triangle Count](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/611%20Valid%20Triangle%20Number.py): `Arrays/two pointer/611 Valid Triangle Number.py`
- [Remove Sorted Duplicates](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/80.%20Remove%20Duplicates%20from%20Sorted%20Array%20II.py): `Arrays/two pointer/80. Remove Duplicates from Sorted Array II.py`
- [Sort by Parity](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/905.%20Sort%20Array%20By%20Parity.py): `Arrays/two pointer/905. Sort Array By Parity.py`
- [Sort by Parity II](https://github.com/pratikyadav-dev/private/blob/main/Arrays/two%20pointer/922.%20Sort%20Array%20By%20Parity%20II.py): `Arrays/two pointer/922. Sort Array By Parity II.py`

### Daily Questions

- [Digit Sum String](https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/2243.%20Calculate%20Digit%20Sum%20of%20a%20String.py): `Daily Question/2243. Calculate Digit Sum of a String.py`
- [Monotonic Subarray](https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/3105.%20Longest%20Strictly%20Increasing%20or%20Strictly%20Decreasing%20Subarray.py): `Daily Question/3105. Longest Strictly Increasing or Strictly Decreasing Subarray.py`
- [Minimum Positive Sum](https://github.com/pratikyadav-dev/private/blob/main/Daily%20Question/3364.%20Minimum%20Positive%20Sum%20Subarray%20.py): `Daily Question/3364. Minimum Positive Sum Subarray .py`

### Other Exercises

- [Distance Value](https://github.com/pratikyadav-dev/private/blob/main/Random/1385.%20Find%20the%20Distance%20Value%20Between%20Two%20Arrays.py): `Random/1385. Find the Distance Value Between Two Arrays.py`
- [Rotated Array Minimum](https://github.com/pratikyadav-dev/private/blob/main/Random/154.%20Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II.py): `Random/154. Find Minimum in Rotated Sorted Array II.py`
