explaingit

seanprashad/leetcode-patterns

12,887TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A curated study resource that organizes LeetCode coding problems by underlying technique (sliding window, two pointers, DFS) to help you prepare for software engineering interviews more efficiently.

Mindmap

mindmap
  root((LeetCode Patterns))
    Patterns
      Sliding Window
      Two Pointers
      Depth-first Search
      Binary Search
    Prerequisites
      Data structures
      Core algorithms
      Recursion
    Tech Stack
      Next.js React
      TypeScript
      Vitest tests
    Features
      Linked problems
      Java solutions
      Local dev server
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study for coding interviews by working through problems grouped by pattern rather than picking questions at random.

USE CASE 2

Reference Java solutions on the companion branch to understand how each pattern is implemented.

USE CASE 3

Clone and run the web app locally to add custom filters or contribute new problem categories.

USE CASE 4

Use the pre-push hook setup as a reference for automatically running tests before pushing in your own Next.js project.

Tech stack

TypeScriptNext.jsReactTailwind CSSVitest

Getting it running

Difficulty · easy Time to first run · 5min

Some problems require a LeetCode Premium subscription to access on the LeetCode platform.

In plain English

Leetcode Patterns is a study resource for people preparing for software engineering job interviews. Instead of working through coding problems at random, this project organizes them by the underlying technique they test, such as sliding window, two pointers, or depth-first search. The idea is that once you recognize a pattern, you can apply the same approach to many different questions. The problem list is hosted online at seanprashad.com/leetcode-patterns, and all of the questions link back to LeetCode, the popular coding practice platform. Some questions require a LeetCode Premium subscription. A companion branch in the same repository contains solutions written in Java for reference. The README suggests building a foundation before starting. It recommends knowing how common data structures work, including arrays, maps, linked lists, queues, heaps, stacks, trees, and graphs, and being comfortable with core algorithms like binary search, breadth-first search, depth-first search, and recursion. A linked PDF covers the main data structures in Java if you need a refresher. The web application that powers the question list is built with Next.js and React, using TypeScript and Tailwind CSS for styling. Developers who want to contribute can clone the repo, install dependencies, and run a local development server. Tests are written with Vitest and React Testing Library, and a pre-push hook runs the test suite automatically before code is shared. The project draws its inspiration from Grokking the Coding Interview, the Blind 75 list, and a Hackernoon article on coding interview patterns. It is not affiliated with LeetCode.

Copy-paste prompts

Prompt 1
I'm preparing for a FAANG interview with 2 weeks left. Which leetcode-patterns categories should I focus on first?
Prompt 2
Show me a sliding window problem from leetcode-patterns and walk me through the solution approach step by step.
Prompt 3
I want to contribute a new problem to leetcode-patterns. How do I add it to the Next.js app and write a Vitest test for it?
Prompt 4
Using the two-pointers pattern from leetcode-patterns, help me solve this array problem: find all pairs in a sorted array that sum to a target value.
Prompt 5
How do I run the leetcode-patterns web app locally and what commands do I need?
Open on GitHub → Explain another repo

← seanprashad on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.