Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/BRANCH_PROTECTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This repo should already have an active **Protect main** ruleset; keep status ch
| Gate Rank matches E/D/C/B/A/S folder | Strict Progression Law |
| No ListNode / heavy CP in E–C | PHP Fitness Filter |
| No open `spoilers/` under `02-Problems` | Hunter Solves First |
| `declare(strict_types=1)` + `php -l` | PHP 8.5 standards |
| `declare(strict_types=1)` + `php -l` | PHP 8.6 standards |
| Letters are Latin-script only in scanned files/paths | English-Only Law (`22`) |
| Design law files present (incl. professionalism ratchet `23`) | Mission / graduation / coaching / craft bar |
| Sacred paths not deleted in PRs | Protect main from accidental wipe |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Competency map: HackerRank PHP (Basic) — PHP Environment (adapted)
## Learn
This gym runs on the **CLI**, not a full LAMP install:

- Install PHP 8.4+ / target 8.5 (`php -v`)
- Install PHP 8.6+ / target 8.6 (`php -v`)
- Run files: `php playground.php` / `php path/to/solution-1.php`
- No Apache/Nginx required to clear Gates
- No MySQL required for the PHP-fit climb
Expand Down
2 changes: 1 addition & 1 deletion 00-Awakening/Part-01-PHP-Basics/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Part 0 — PHP Basics

Target: **PHP 8.5** with `declare(strict_types=1);`
Target: **PHP 8.6** with `declare(strict_types=1);`

| Lesson | Topic | Status |
|:---|:---|:---|
Expand Down
2 changes: 1 addition & 1 deletion 00-Awakening/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## Mission

Enough **PHP 8.5** + **problem-solving literacy** to enter `01-E-Gates` without drowning.
Enough **PHP 8.6** + **problem-solving literacy** to enter `01-E-Gates` without drowning.

## Parts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Use when the problem matches this pattern’s trigger (see What / CHECK).


## Teaching note
AI may show a **tiny** annotated PHP 8.5 example in chat.
AI may show a **tiny** annotated PHP 8.6 example in chat.
You type it into `example.php` yourself.

## CHECK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Push every `0` to the end of the list while keeping the relative order of non-ze

Example: `[0,1,0,3,12]` → `[1,3,12,0,0]`.

(W3Schools weekly-style challenge — solve in PHP 8.5.)
(W3Schools weekly-style challenge — solve in PHP 8.6.)

## What This Gate Is Testing
Stable partition / two-pointer write index.
Expand Down
2 changes: 1 addition & 1 deletion 03-Mock-Interview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Not a product project. Prove you can clear under pressure:
1. Clarify constraints
2. Examples
3. Brute → optimize
4. Code in PHP 8.5
4. Code in PHP 8.6
5. Test edge cases
6. State Time / Space

Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## What this repo is

PHP 8.5 **Learn + Solve** gym (Solo Leveling): Skill Books → Gates → mocks → Interview Armor.
PHP 8.6 **Learn + Solve** gym (Solo Leveling): Skill Books → Gates → mocks → Interview Armor.
Exit: **Big Tech / FAANG Ready** (honest: PHP is not the default FAANG live-coding language).

**Not:** solutions dump · OOP / Design Patterns / Laravel course.
Expand Down Expand Up @@ -41,7 +41,7 @@ Before editing: **What becomes more professional after this?**

## Code standards

- PHP 8.5 · `declare(strict_types=1);` · typed signatures
- PHP 8.6 · `declare(strict_types=1);` · typed signatures
- No framework inside Gate solutions · prefer arrays / maps / `Spl*`

## Do / Do not
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ Required PR checks: `Repo Laws + PHP Lint` · `Sacred Structure Guard`
Suggested **name:** `php-problem-solving-solo-leveling`

**Description:**
`PHP 8.5 Learn + Solve gym: 238 DSA Gate stubs, Solo Leveling ranks, Hunter Solves First — not a solutions dump.`
`PHP 8.6 Learn + Solve gym: 238 DSA Gate stubs, Solo Leveling ranks, Hunter Solves First — not a solutions dump.`

**Topics:** `php` `php85` `dsa` `leetcode` `problem-solving` `interview-prep` `algorithms` `solo-leveling`
**Topics:** `php` `php86` `dsa` `leetcode` `problem-solving` `interview-prep` `algorithms` `solo-leveling`

```bash
# from a clean main (all changes committed; .cursor/ is gitignored)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> It is a **PHP DSA Learn + Solve gym** — not a Study repo and not a solutions dump.
> → [Organization home](https://github.com/galhoom-path)

[![PHP 8.5+(https://img.shields.io/badge/PHP-8.5%2B-777BB4?logo=php&logoColor=white)](https://www.php.net/)
[![PHP 8.6+(https://img.shields.io/badge/PHP-8.6%2B-777BB4?logo=php&logoColor=white)](https://www.php.net/)
[![Gates](https://img.shields.io/badge/Gates-238%20stubs-blue)](02-Problems/README.md)
[![Hunter Solves First](https://img.shields.io/badge/Spoilers-Off-critical)](repo-ideas/21-hunter-solves-first-no-direct-answers.md)
[![CI](https://github.com/galhoom-path/php-problem-solving-solo-leveling/actions/workflows/ci.yml/badge.svg)](https://github.com/galhoom-path/php-problem-solving-solo-leveling/actions/workflows/ci.yml)
Expand All @@ -32,7 +32,7 @@ PHP is not the usual FAANG live-coding language; the *patterns* still transfer.
## Quick start

```bash
php -v # PHP 8.5+
php -v # PHP 8.6+
php playground.php
```

Expand Down
4 changes: 2 additions & 2 deletions SOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| Pattern bucket names | [Blind 75](https://neetcode.io/practice/practice/blind75) · [NeetCode 150](https://neetcode.io/practice/practice/neetcode150) · [250](https://neetcode.io/practice/practice/neetcode250) · [All](https://neetcode.io/practice/practice/allNC) — used as **selection ideas**, not as a mirrored dump |
| Rank / Fitness / Hunter Solves First | Repo laws under [`repo-ideas/`](repo-ideas/) (esp. [`19`](repo-ideas/19-php-fitness-filter.md), [`21`](repo-ideas/21-hunter-solves-first-no-direct-answers.md)) |
| Sibling polish ideas | Hunter’s own repos listed below — structure/pitch only, not their curricula |
| Runtime target | **PHP 8.5** · [PHP Manual](https://www.php.net/manual/en/) |
| Runtime target | **PHP 8.6** · [PHP Manual](https://www.php.net/manual/en/) |

**Audit:** `php scripts/audit-sources-and-links.php` checks every Gate has a Source line, internal markdown links resolve, and HTTP URLs respond. Some platforms (LeetCode, Codeforces, Exercism) often return **403** to bots; treat that as bot-block, not a dead link, when the path matches a known problem slug.

Expand Down Expand Up @@ -70,4 +70,4 @@
| A | Harder Medium / light Hard |
| S | Hard / prestige |

Runtime: **PHP 8.5** · [PHP Manual](https://www.php.net/manual/en/)
Runtime: **PHP 8.6** · [PHP Manual](https://www.php.net/manual/en/)
2 changes: 1 addition & 1 deletion SYSTEM-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Objective: Clear Gates. Absorb Patterns. Level Up Alone.
| 2026-09-19 | Gate folder order | Categories + IDs remapped easiest→harder within each rank (E Numbers→…→Arrays; C Strings→…→Window; Side Quests prefixed) |
| 2026-09-19 | Face polish | Borrowed Pareto-set craft: Clear method + Credits + naming callout (no solution dump) |
| 2026-09-19 | Published | Public GitHub: `Galhoom22/php-problem-solving-solo-leveling` (description + topics; Actions from `pending-workflows`) |
| 2026-09-19 | GitHub-ready | LICENSE holder · CI PHP 8.5 · `.cursor/` ignored · publish checklist · Skill Book Backend Links filled · sealed Armor/Mock placeholders |
| 2026-09-19 | GitHub-ready | LICENSE holder · CI PHP 8.6 · `.cursor/` ignored · publish checklist · Skill Book Backend Links filled · sealed Armor/Mock placeholders |
| 2026-09-19 | Scope trim | Face docs + design pack cut to single-purpose; Gate README boilerplate stripped |
| 2026-09-19 | Doc cleanup | Removed duplicate design index + obsolete ideation (`14`, `16`); merged README guide into `06` |
| 2026-09-19 | DSA Pattern Catalog | `PATTERN-CATALOG.md` + boundary vs GoF |
Expand Down
4 changes: 2 additions & 2 deletions repo-ideas/00-mission-learn-and-solve.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Details: `21`.

## Product

**Home of Problem Solving + DSA specialized for PHP 8.5** — Learn + Solve system, not a solutions dump.
**Home of Problem Solving + DSA specialized for PHP 8.6** — Learn + Solve system, not a solutions dump.

| Is | Is not |
|:---|:---|
Expand All @@ -34,7 +34,7 @@ PHP-fit required climb — `19`.
| Mode | Requirement |
|:---|:---|
| Learn | Plain teaching (concepts, Backend Link) — no opening algorithm dump |
| Solve | Hunter implements in PHP 8.5 and can explain |
| Solve | Hunter implements in PHP 8.6 and can explain |

Answer-only Gate = invalid. Lecture-only Skill Book = invalid.

Expand Down
8 changes: 4 additions & 4 deletions repo-ideas/01-core-idea.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

This repository is dedicated to **one thing only**:

> **Problem Solving + DSA specialized for PHP 8.5 — as a Learn + Solve system.**
> **Problem Solving + DSA specialized for PHP 8.6 — as a Learn + Solve system.**

It is a **learning academy and a solving gym**, not a solutions dump.

- **Opening rule:** Gates are authored **without finished solutions first**; the AI explains what the problem wants, the hunter tries alone, then non-spoiler coaching (`21`)
- Solutions here are **PHP only** (PHP 8.5)
- Solutions here are **PHP only** (PHP 8.6)
- PHP-specialized training — not language-agnostic DSA with PHP pasted on (`19`)
- Problems are curated from many platforms, then filtered for PHP fitness
- No full OOP / OOD / Design Patterns / Laravel courses here — sibling study repos
Expand All @@ -31,13 +31,13 @@ Exit: **Big Tech Ready** / **FAANG Ready** (`20`) — honest that PHP is not the
Every item must support both:

1. **Learn** — teach the idea in plain language
2. **Solve** — hunter writes PHP 8.5 and explains
2. **Solve** — hunter writes PHP 8.6 and explains

A Gate with only an answer is incomplete. A lecture with no practice is incomplete.

## Motto

> Learn the Skill → Enter the Gate → Write PHP 8.5 → Level Up → Arise.
> Learn the Skill → Enter the Gate → Write PHP 8.6 → Level Up → Arise.

## Why Solo Leveling?

Expand Down
4 changes: 2 additions & 2 deletions repo-ideas/02-multi-platform-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Build a **huge PHP-only problem collection** by pulling famous challenges from m
2. Prefer platforms with **official PHP support** when practicing online (LeetCode, HackerRank, Codewars, Exercism, Edabit, etc.).
3. **PHP Fitness Filter first** (`19-php-fitness-filter.md`): do not import into the required climb if the problem feels like C++/Java DSA theater with PHP syntax.
4. Prefer array/string/map/nested-structure problems; reject heavy linked-list pointer drills and heavy CP structures for the core path.
5. For platforms where PHP may be limited/unavailable in the online judge (some CP sites), allow only if the problem still passes PHP Fitness and the student solves locally in PHP 8.5.
5. For platforms where PHP may be limited/unavailable in the online judge (some CP sites), allow only if the problem still passes PHP Fitness and the student solves locally in PHP 8.6.
6. Every Gate README must end with a `Source:` (or `Sources:`) line including platform + URL.
7. Do **not** paste copyrighted problem statements verbatim at huge length if the platform forbids it — link the source and write a short System Brief / paraphrase where needed.
8. Deduplicate: if “Two Sum” appears on multiple sites, keep **one Gate**, list multiple Sources.
Expand Down Expand Up @@ -67,7 +67,7 @@ Normalization rules:
4) Assign pattern tag + Min Hunter Rank + XP
5) Place folder ONLY in the correct ordered slot
6) Write Gate README + Source link
7) Student solves in PHP 8.5 locally (and/or on the platform if PHP is supported)
7) Student solves in PHP 8.6 locally (and/or on the platform if PHP is supported)
8) Update Gate Source Map + Status Window when cleared
```

Expand Down
2 changes: 1 addition & 1 deletion repo-ideas/06-root-readme-ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Root `README.md` must keep these phrases: `STATUS WINDOW`, `Hunter Rank`, `Arise

## Section checklist

1. Badges (PHP 8.5, Gate count, Spoilers Off, English, CI)
1. Badges (PHP 8.6, Gate count, Spoilers Off, English, CI)
2. One-line pitch + System Notice
3. **At a glance** (what / how / order / start / laws)
4. Repository map (tracks `00`→`04`)
Expand Down
4 changes: 2 additions & 2 deletions repo-ideas/07-track-1-skill-books.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 07 — Track 1: Skill Books

> How Skill Books teach DSA / PS patterns in PHP 8.5.
> How Skill Books teach DSA / PS patterns in PHP 8.6.
> Live catalog: [`../01-Patterns-And-Fundamentals/PATTERN-CATALOG.md`](../01-Patterns-And-Fundamentals/PATTERN-CATALOG.md).

## Parts (rank-gated)
Expand All @@ -17,7 +17,7 @@ Not in required Skill Books: linked-list pointer theater, union-find, bit olympi

1. What / when
2. Backend Link (`18`)
3. Tiny annotated PHP 8.5 example (hunter types it)
3. Tiny annotated PHP 8.6 example (hunter types it)
4. Common mistakes
5. CHECK before related Gates

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 12 — PHP 8.5 problem-solving standards
# 12 — PHP 8.6 problem-solving standards

> Coding conventions for Gate solutions and teaching examples.

1. Target **PHP 8.5** everywhere
1. Target **PHP 8.6** everywhere
2. Every file: `<?php` + `declare(strict_types=1);`
3. Typed signatures: `function twoSum(array $nums, int $target): array`
4. Clear names: `camelCase` functions · `PascalCase` classes when needed
Expand All @@ -12,3 +12,10 @@
8. `ListNode` / `TreeNode` only in Interview Armor (or Side Quests), not early E–C core
9. No Laravel / framework inside Gate solutions
10. Local scratch: root `playground.php` — never Gate answers


## PHP 8.6 fitness (when the pattern allows)

- Prefer `clamp()` over nested `min`/`max` for bounds.
- Prefer partial application over noisy arrow wrappers when teaching callbacks later.
- Do not use deprecated 8.6 APIs (`return` in `finally`, `mb_ereg*`, `is_long` / `is_double`, `spl_object_hash`).
2 changes: 1 addition & 1 deletion repo-ideas/13-ai-skill-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Solving contract

1. Brief what the Gate wants (no algorithm dump)
2. Hunter attempts alone in PHP 8.5
2. Hunter attempts alone in PHP 8.6
3. If stuck → coaching ladder (questions → hints → scaffold)
4. Hunter writes every `solution-*.php`

Expand Down
2 changes: 1 addition & 1 deletion repo-ideas/15-quality-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Product

- [ ] One purpose: PHP 8.5 Problem Solving + DSA (Learn + Solve)
- [ ] One purpose: PHP 8.6 Problem Solving + DSA (Learn + Solve)
- [ ] Absolute beginners can start at Awakening / E-Rank
- [ ] Exit path defined: Big Tech Ready / FAANG Ready (`20`)
- [ ] Honest FAANG stance: PHP is not the default live-coding language
Expand Down
Loading
Loading