# nikhi-bit/nikhil-_leetcode architecture

> Architecture diagram of the GitHub repository nikhi-bit/nikhil-_leetcode, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nikhi-bit/nikhil-_leetcode
- Repository: https://github.com/nikhi-bit/nikhil-_leetcode

## Overview

This repository is a collection of independent C++ LeetCode solutions, not a single application or shared runtime. The principal workflow is to select a problem, provide its inputs to that problem’s Solution method (typically through the judge), and receive its answer. The graph groups representative solutions by algorithmic theme; sampled binary-search solutions also show their internal feasibility checks. The README excerpt is truncated and only some implementations were sampled, so other listed solutions are represented only where their paths and problem names are explicit in the tree.

Main entry points: [`1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp`](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp) (Smallest Divisor), [`0875-koko-eating-bananas/0875-koko-eating-bananas.cpp`](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0875-koko-eating-bananas/0875-koko-eating-bananas.cpp) (Banana Speed), [`0410-split-array-largest-sum/0410-split-array-largest-sum.cpp`](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0410-split-array-largest-sum/0410-split-array-largest-sum.cpp) (Split Array Sum), [`1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp`](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp) (Ship Capacity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_arrays["Array Operations"]
  node_two_sum["Two Sum<br/>[0001-two-sum.cpp]"]
  node_four_sum["Four Sum<br/>[0018-4sum.cpp]"]
  node_window_average["Window Average"]
end

subgraph group_search["Binary Search"]
  node_rotated_search["Rotated Search"]
  node_rotated_search_dupes["Rotated Search Duplicates"]
  node_smallest_divisor["Smallest Divisor"]
  node_divisor_check["Divisor Feasibility"]
  node_banana_speed["Banana Speed"]
  node_banana_check["Speed Feasibility"]
  node_split_array["Split Array Sum"]
  node_split_check["Split Feasibility"]
  node_ship_capacity["Ship Capacity"]
  node_ship_check["Capacity Feasibility"]
  node_magnetic_force["Magnetic Force"]
  node_force_check["Placement Feasibility"]
  node_trip_time["Trip Completion Time"]
  node_trip_check["Trip Feasibility"]
end

subgraph group_combinatorial["Combinatorial Search"]
  node_combination_sum["Combination Sum"]
  node_parentheses["Generate Parentheses"]
end

subgraph group_strings["Strings And Numbers"]
  node_string_search["String Search"]
  node_palindrome["Valid Palindrome"]
  node_happy_number["Happy Number"]
end

node_judge(("LeetCode Judge"))

node_judge -->|"invokes"| node_two_sum
node_judge -->|"invokes"| node_four_sum
node_judge -->|"invokes"| node_window_average
node_judge -->|"invokes"| node_rotated_search
node_judge -->|"invokes"| node_rotated_search_dupes
node_judge -->|"invokes"| node_smallest_divisor
node_judge -->|"invokes"| node_banana_speed
node_judge -->|"invokes"| node_split_array
node_judge -->|"invokes"| node_ship_capacity
node_judge -->|"invokes"| node_magnetic_force
node_judge -->|"invokes"| node_trip_time
node_judge -->|"invokes"| node_combination_sum
node_judge -->|"invokes"| node_parentheses
node_judge -->|"invokes"| node_string_search
node_judge -->|"invokes"| node_palindrome
node_judge -->|"invokes"| node_happy_number
node_smallest_divisor -->|"checks candidates"| node_divisor_check
node_banana_speed -->|"checks candidates"| node_banana_check
node_split_array -->|"checks candidates"| node_split_check
node_ship_capacity -->|"checks candidates"| node_ship_check
node_magnetic_force -->|"checks candidates"| node_force_check
node_trip_time -->|"checks candidates"| node_trip_check

click node_two_sum "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0001-two-sum/0001-two-sum.cpp"
click node_four_sum "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0018-4sum/0018-4sum.cpp"
click node_window_average "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold.cpp"
click node_rotated_search "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.cpp"
click node_rotated_search_dupes "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0081-search-in-rotated-sorted-array-ii/0081-search-in-rotated-sorted-array-ii.cpp"
click node_smallest_divisor "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp"
click node_divisor_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp"
click node_banana_speed "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0875-koko-eating-bananas/0875-koko-eating-bananas.cpp"
click node_banana_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0875-koko-eating-bananas/0875-koko-eating-bananas.cpp"
click node_split_array "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0410-split-array-largest-sum/0410-split-array-largest-sum.cpp"
click node_split_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0410-split-array-largest-sum/0410-split-array-largest-sum.cpp"
click node_ship_capacity "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp"
click node_ship_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp"
click node_magnetic_force "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp"
click node_force_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp"
click node_trip_time "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp"
click node_trip_check "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp"
click node_combination_sum "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0039-combination-sum/0039-combination-sum.cpp"
click node_parentheses "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0022-generate-parentheses/0022-generate-parentheses.cpp"
click node_string_search "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp"
click node_palindrome "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0125-valid-palindrome/0125-valid-palindrome.cpp"
click node_happy_number "https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0202-happy-number/0202-happy-number.cpp"

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_two_sum,node_four_sum,node_window_average toneBlue
class node_rotated_search,node_rotated_search_dupes,node_smallest_divisor,node_divisor_check,node_banana_speed,node_banana_check,node_split_array,node_split_check,node_ship_capacity,node_ship_check,node_magnetic_force,node_force_check,node_trip_time,node_trip_check toneAmber
class node_combination_sum,node_parentheses toneMint
class node_string_search,node_palindrome,node_happy_number toneRose
class node_judge toneIndigo
```

## Components

### Array Operations

- [Two Sum](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0001-two-sum/0001-two-sum.cpp): `0001-two-sum/0001-two-sum.cpp`
- [Four Sum](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0018-4sum/0018-4sum.cpp): `0018-4sum/0018-4sum.cpp`
- [Window Average](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold.cpp): `1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/1343-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold.cpp`

### Binary Search

- [Rotated Search](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.cpp): `0033-search-in-rotated-sorted-array/0033-search-in-rotated-sorted-array.cpp`
- [Rotated Search Duplicates](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0081-search-in-rotated-sorted-array-ii/0081-search-in-rotated-sorted-array-ii.cpp): `0081-search-in-rotated-sorted-array-ii/0081-search-in-rotated-sorted-array-ii.cpp`
- [Smallest Divisor](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp): `1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp`
- [Divisor Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp): `1283-find-the-smallest-divisor-given-a-threshold/1283-find-the-smallest-divisor-given-a-threshold.cpp`
- [Banana Speed](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0875-koko-eating-bananas/0875-koko-eating-bananas.cpp): `0875-koko-eating-bananas/0875-koko-eating-bananas.cpp`
- [Speed Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0875-koko-eating-bananas/0875-koko-eating-bananas.cpp): `0875-koko-eating-bananas/0875-koko-eating-bananas.cpp`
- [Split Array Sum](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0410-split-array-largest-sum/0410-split-array-largest-sum.cpp): `0410-split-array-largest-sum/0410-split-array-largest-sum.cpp`
- [Split Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0410-split-array-largest-sum/0410-split-array-largest-sum.cpp): `0410-split-array-largest-sum/0410-split-array-largest-sum.cpp`
- [Ship Capacity](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp): `1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp`
- [Capacity Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp): `1011-capacity-to-ship-packages-within-d-days/1011-capacity-to-ship-packages-within-d-days.cpp`
- [Magnetic Force](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp): `1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp`
- [Placement Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp): `1552-magnetic-force-between-two-balls/1552-magnetic-force-between-two-balls.cpp`
- [Trip Completion Time](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp): `2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp`
- [Trip Feasibility](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp): `2187-minimum-time-to-complete-trips/2187-minimum-time-to-complete-trips.cpp`

### Combinatorial Search

- [Combination Sum](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0039-combination-sum/0039-combination-sum.cpp): `0039-combination-sum/0039-combination-sum.cpp`
- [Generate Parentheses](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0022-generate-parentheses/0022-generate-parentheses.cpp): `0022-generate-parentheses/0022-generate-parentheses.cpp`

### Strings And Numbers

- [String Search](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp): `0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp`
- [Valid Palindrome](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0125-valid-palindrome/0125-valid-palindrome.cpp): `0125-valid-palindrome/0125-valid-palindrome.cpp`
- [Happy Number](https://github.com/nikhi-bit/nikhil-_leetcode/blob/main/0202-happy-number/0202-happy-number.cpp): `0202-happy-number/0202-happy-number.cpp`

### Other components

- **LeetCode Judge**

## Connections

- LeetCode Judge → Two Sum: invokes
- LeetCode Judge → Four Sum: invokes
- LeetCode Judge → Window Average: invokes
- LeetCode Judge → Rotated Search: invokes
- LeetCode Judge → Rotated Search Duplicates: invokes
- LeetCode Judge → Smallest Divisor: invokes
- LeetCode Judge → Banana Speed: invokes
- LeetCode Judge → Split Array Sum: invokes
- LeetCode Judge → Ship Capacity: invokes
- LeetCode Judge → Magnetic Force: invokes
- LeetCode Judge → Trip Completion Time: invokes
- LeetCode Judge → Combination Sum: invokes
- LeetCode Judge → Generate Parentheses: invokes
- LeetCode Judge → String Search: invokes
- LeetCode Judge → Valid Palindrome: invokes
- LeetCode Judge → Happy Number: invokes
- Smallest Divisor → Divisor Feasibility: checks candidates
- Banana Speed → Speed Feasibility: checks candidates
- Split Array Sum → Split Feasibility: checks candidates
- Ship Capacity → Capacity Feasibility: checks candidates
- Magnetic Force → Placement Feasibility: checks candidates
- Trip Completion Time → Trip Feasibility: checks candidates
