GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ezpectus/Algorithm-patterns: Collection of algorithmic patterns with explanations and multiple examples for each — from sliding window to greedy and prefix sums.

BranchesTags
Open more actions menu

Latest commit

 

History

286 Commits
286 Commits

Folders and files

NameName
Last commit message
Last commit date
AlgoTricks
AlgoTricks
 
 
BFS_Pattern
BFS_Pattern
 
 
DFS_Pattern
DFS_Pattern
 
 
Dynamic_Programming
Dynamic_Programming
 
 
GreedyPattern
GreedyPattern
 
 
MergeSort
MergeSort
 
 
Other_Algorithms
Other_Algorithms
 
 
Sliding-Window
Sliding-Window
 
 
Two Pointers Pattern
Two Pointers Pattern
 
 
Union_FIND
Union_FIND
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 

Repository files navigation

Algorithm Patterns šŸ“ššŸš€

This repository is my personal library of coding patterns — reusable algorithmic approaches that can be applied to solve multiple problems on platforms like LeetCode, Codeforces, HackerRank, or in real-world projects.

The main goal is to understand, memorize, and quickly recognize these patterns during problem-solving, instead of relying on random guesswork.


Why I Created This Repository šŸ’”

I've solved hundreds of algorithmic problems, but noticed a repeating truth:

Many problems are just variations of the same core patterns.

The real skill isn't just solving one problem — it's recognizing the underlying technique instantly, and applying it in your own style.

This repo is designed to:

  • Build my personal algorithmic muscle memory 🧠
  • Document patterns with clear explanations
  • Provide multiple code implementations for each pattern
  • Categorize patterns for quick navigation
  • Create a long-term reference for myself and others

Structure šŸ—‚ļø

Each pattern has:

  1. README section explaining:
    • When to use the pattern
    • Time/space complexity
    • Common pitfalls
  2. Example problems (3–5 per pattern)
  3. Solutions in C# (my main language), sometimes with Python/Java for comparison
  4. Pattern Variations if applicable

Example Pattern: Sliding Window

When to use:

  • Problems involving subarrays/substrings
  • Optimizing repeated range calculations
  • Fixed-size or dynamic ranges

Advantages:

  • Reduces O(n²) solutions to O(n)
  • Simplifies logic for continuous segments

Common mistakes:

  • Forgetting to update the window after moving pointers
  • Not handling edge cases (empty arrays, single elements)

Example Problems:

  • Find the maximum sum of k consecutive elements
  • Longest substring without repeating characters
  • Minimum size subarray sum

Categories šŸ“‹

  • Two Pointers
  • Sliding Window
  • Prefix Sum
  • Binary Search Patterns
  • Greedy
  • Dynamic Programming Templates
  • Graph Traversal (BFS/DFS)
  • Backtracking
  • Heap/Priority Queue
  • Hashing Tricks

How to Use This Repo šŸ› ļø

  1. Pick a pattern from the list
  2. Read the theory & common use cases
  3. Go through the example problems
  4. Implement them without looking at the solution
  5. Compare with my solution & note any improvements

License šŸ“œ

This project is licensed under the MIT License — you are free to use, modify, and share the code, but please credit the author.


Future Plans šŸš€

  • Expand examples for competitive programming
  • Add a "micro patterns" section (tiny reusable tricks)
  • Compare performance of different approaches for the same problem

About Me šŸ‘Øā€šŸ’»

I'm a developer focused on mastering algorithms and data structures, not just for interview prep, but to be able to solve any problem from scratch, in my own way.
This repository is a key part of that journey.

About

Collection of algorithmic patterns with explanations and multiple examples for each — from sliding window to greedy and prefix sums.

Resources

Readme
MIT license

Security policy

Security policy
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.