-
Notifications
You must be signed in to change notification settings - Fork 0
Introduce Dual-Track Pattern Documentation with Intuition-First Learning Across Core Algorithmic Patterns #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add comprehensive core concepts section in _header.md - Expand _templates.md with detailed explanations for each template - Include usage scenarios, complexity analysis, and LeetCode problems - Add template variants (duplicates handling, constraints, etc.)
- Replace generic "variant" and "base" suffixes with problem-specific names - Align naming convention with sliding_window pattern - Update _config.toml to reference new filenames - Improve readability: filenames now indicate problem content at a glance
Create intuition.md as a complementary document to templates.md that focuses on building pattern-level understanding before code: - Introduce Explorer/Gatekeeper mental model for window boundaries - Frame invariants as "promises" the window must keep - Describe maximize/minimize modes with vivid metaphors - Add pattern recognition flowchart and problem mapping table - Defer code until after conceptual understanding is established
Improve intuition.md with practical visualizations and examples: - Add ASCII flowcharts for Maximize and Minimize window modes with color-coded R (Explorer) and L (Gatekeeper) movements - Convert "Visualizing the Dance" to structured table format with Step, R, State, L move, Window, and Result columns - Add concept-to-code comments linking Explorer/Gatekeeper roles to for-loop and while-loop in template - Add Fixed Window (K=3) example trace after Shape 3 demonstrating constant-size sliding behavior
…ion.md - Add 5 runnable solutions: LC 3, 340, 76, 438, 209 - Include detailed time/space complexity analysis per problem - Add verification code with test cases for each solution - Add definitive O(n) complexity analysis section - Use semantic, project-level variable naming throughout
Create comprehensive pattern intuition document with: - Six two-pointer shapes with vivid mental models - Invariant and irreversibility principles explained - Visual traces for opposite, same-direction, fast-slow, and Dutch flag - Pattern recognition flowchart for instant identification - Templates derived from intuition, not as starting points
- Add "How to Use This Documentation" section explaining learning paths - Update pattern table with direct links to intuition.md and templates.md - Apply to sliding_window, two_pointers, and backtracking_exploration
Change "Copy-paste ready code" to "Production-ready implementations" for a more professional tone.
- Add Intuition and Templates learning paths for each pattern - Update BacktrackingExploration from "coming soon" to available - Add LinkedListInPlaceReversal and MonotonicStack as upcoming patterns - Update README.md and README_zh-TW.md with new table format
lufftw
commented
Dec 14, 2025
Owner
Author
lufftw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! I went through the implementation and didn’t find any issues. The changes are clear and well-structured.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a dual-track documentation system for algorithmic patterns, designed to support both intuition-first learning and production-ready implementation reference.
The objective is to help readers recognize patterns instantly before writing code, while still providing high-quality, reusable templates for real-world problem solving.
✨ Key Highlights
1. Dual-Track Learning Structure
Each pattern now provides two complementary learning paths:
Intuition Path (
intuition.md)Focuses on mental models, invariants, irreversibility, and pattern recognition before code.
Templates Path (
templates.md)Provides production-ready implementations with clear usage scenarios, variants, and complexity analysis.
Navigation between the two paths is clearly documented in each pattern README.
2. Backtracking Exploration Enhancements
_header.md_templates.mdwith:_config.tomlto align with the new naming scheme3. Sliding Window Intuition System
intuition.mdemphasizing pattern recognition over mechanics4. Two Pointers Intuition Guide
intuition.mdcovering six canonical two-pointer shapes5. Documentation Navigation & Tone Improvements
🎯 Why This Matters
This documentation structure reflects how strong problem solvers actually think:
It lowers the learning barrier for beginners while remaining valuable for experienced engineers who want clean, reusable implementations.