MCPcopy
hub / github.com/seanprashad/leetcode-patterns

github.com/seanprashad/leetcode-patterns @main sqlite

repository ↗ · DeepWiki ↗
144 symbols 437 edges 57 files 0 documented · 0%
README
<img alt="Leetcode Patterns" src="https://github.com/seanprashad/leetcode-patterns/raw/main/public/images/logo-light.png" width="500" />

Deploy to GitHub Pages Update Questions

Table of Contents

Background

This repo is intended for any individual wanting to improve their problem solving skills for software engineering interviews.

Problems are grouped under their respective subtopic, in order to focus on repeatedly applying common patterns rather than randomly tackling questions.

All questions are available on leetcode.com with some requiring leetcode premium.

Fundamentals

To find the greatest amount of success when practicing, it is highly recommended to know the methods and runtimes of the following data structures and their operations:

  • Arrays
  • Maps
  • Linked Lists
  • Queues
  • Heaps
  • Stacks
  • Trees
  • Graphs

In addition, you should have a good grasp on common algorithms such as:

  • Breadth-first search
  • Depth-first search
  • Binary search
  • Recursion

Notes

This pdf contains information for the main data structures in Java.

Other useful methods to know include substring(), toCharArray(), Math.max(), Math.min(), and Arrays.fill().

Question List

The entire question list can be found here: https://seanprashad.com/leetcode-patterns/.

Solutions

Solutions written in Java can be found in the solutions branch.

Contributing

The app is built with Next.js (App Router), React 19, TypeScript, Tailwind CSS v4, TanStack Table v8, Lucide React for icons, and Google Analytics via @next/third-parties. Tests use Vitest + React Testing Library.

npm install
npm run dev         # http://localhost:3000
npm test            # single run
npm run test:watch  # watch mode

A Husky pre-push hook runs npm test automatically before every push. This is set up for every clone via the prepare script.

Acknowledgements

This list is heavily inspired from Grokking the Coding Interview with additional problems extracted from the Blind 75 list and this hackernoon article on 14 patterns to ace any coding interview question.

Extension points exported contracts — how you extend this code

Company (Interface)
(no doc)
src/types/question.ts
AuthContextValue (Interface)
(no doc)
src/components/layout/AuthContext.tsx
Reminder (Interface)
(no doc)
src/lib/reminders.ts
RoadmapQuestion (Interface)
(no doc)
src/data/roadmaps.ts
Question (Interface)
(no doc)
src/types/question.ts
GroupHeaderRowProps (Interface)
(no doc)
src/components/questions/GroupHeaderRow.tsx
FetchEvent (Interface)
(no doc)
src/lib/sw.test.ts
RoadmapPhase (Interface)
(no doc)
src/data/roadmaps.ts

Core symbols most depended-on inside this repo

trackEvent
called by 47
src/lib/analytics.ts
saveCompleted
called by 15
src/lib/storage.ts
saveReminders
called by 15
src/lib/storage.ts
loadCompleted
called by 14
src/lib/storage.ts
saveNotes
called by 14
src/lib/storage.ts
mergeFromRealtimePayload
called by 14
src/lib/sync.ts
loadNotes
called by 13
src/lib/storage.ts
loadReminders
called by 13
src/lib/storage.ts

Shape

Function 107
Interface 17
Method 11
Class 9

Languages

TypeScript81%
Python19%

Modules by API surface

cron/leetcode/models.py17 symbols
src/lib/storage.ts15 symbols
src/components/questions/QuestionsTable.tsx12 symbols
src/lib/sync.ts9 symbols
src/lib/reminders.ts8 symbols
cron/update_questions.py7 symbols
src/lib/sw.test.ts6 symbols
src/components/roadmaps/RoadmapView.tsx6 symbols
src/components/questions/NoteModal.tsx5 symbols
src/components/layout/AuthContext.tsx5 symbols
src/components/layout/ThemeToggle.tsx4 symbols
src/types/question.ts3 symbols

Dependencies from manifests, versioned

@next/third-parties16.1.6 · 1×
@supabase/supabase-js2.99.0 · 1×
@tanstack/react-table8.21.3 · 1×
@tanstack/react-virtual3.13.21 · 1×
@testing-library/jest-dom6.9.1 · 1×
@testing-library/react16.3.2 · 1×
@testing-library/user-event14.6.1 · 1×
@types/node20 · 1×
@types/react19 · 1×
@types/react-dom19 · 1×
@vitejs/plugin-react5.1.4 · 1×

For agents

$ claude mcp add leetcode-patterns \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact