-
-
Drill Practice - auto generated based on ur previous mistakes
-
projected timeline and notes auto captured for each question you submitted
-
flexible model use - user can choose to use local free models or cloud APIs
-
Set up page have different language supports
-
Different color theme. Cyberpunk theme
-
Analysis on the progress you made on each algorithm
-
Weakness Radar to help you understand yourself
Make LC Easy Again - Hackathon Submission
Inspiration
As someone who regularly practices LeetCode problems, I found myself frustrated by the inefficiency of traditional review methods. I knew that spaced repetition is the scientifically proven best way to master long-term retention, yet no tool existed to apply this technique to coding practice.
Moreover, reviewing entire problems from scratch felt exhausting and time-consuming. I realized that the real value lies in identifying specific weaknesses and generating targeted micro-drills to address them—rather than redoing full problems repeatedly. This insight led me to build a smarter, more efficient way to master algorithmic problem-solving, powered by Google Gemini's advanced AI capabilities.
What it does
LeetCode EasyRepeat is a Chrome extension that transforms LeetCode practice into a scientifically-optimized learning system powered by Google Gemini AI:
Core Features:
AI-Generated Micro-Drills: Instead of redoing entire problems, Gemini generates bite-sized practice exercises targeting your weak spots. Drill types include:
- Muscle-memory: Write common patterns from scratch, verified by an AI Safe Observer that converts pseudo code to Python and actually executes it in a sandboxed environment to verify correctness.
- Fill-in-the-blank: Complete missing code snippets
- Spot-the-bug: Identify errors in buggy code
- Critique: Analyze and improve suboptimal solutions
Intelligent Spaced Repetition: Automatically tracks your accepted submissions and schedules reviews using the FSRS v4.5 algorithm (the same system used by Anki). Each problem gets a personalized review schedule based on your performance—problems you struggle with appear more frequently, while mastered ones fade into longer intervals.
Neural Retention Agent (Skill DNA): An AI-powered system that uses AI to analyze your submissions and build a "skill confidence map" across 50+ algorithmic patterns (binary search, dynamic programming, graph traversal, etc.). It tracks which skills are improving, declining, or need attention through nightly automated analysis.
Wrong Answer Analysis with RAG: When you submit incorrect code, Gemini 2.5 Flash analyzes your mistake by searching a vector database (using Gemini's embedding API) of similar past errors. It provides personalized explanations and can even auto-generate fixes using local LLMs.
Visual Dashboard: A beautiful interface featuring:
- GitHub-style activity heatmap with animated pulsing cells
- Problem cards showing FSRS metadata (stability, difficulty, next review date)
- Skill confidence visualization with trend indicators
- Streak tracking and mini projection timelines
- Different color themes
How I Used Google Gemini
Google Gemini is the core intelligence engine powering this extension. I built a flexible multi-model architecture where users can choose their preferred Gemini model, and that single model powers ALL AI features:
Unified Model Architecture
Users select ONE Gemini model in the settings page, which then powers:
- Nightly Skill Analysis: Automated digest that analyzes daily submissions and updates Skill DNA
- Personalized Drill Generation: Creates targeted micro-drills for weak skills
- AI Safe Observer: Generates and verifies executable code for muscle-memory drills
- Wrong Answer Analysis with RAG: Provides root cause analysis using vector database search
- Historical Backfill: Rebuilds Skill DNA from past submissions
- Embedding Generation: Creates semantic vectors for the RAG system
Available Gemini Models
I integrated 5 Gemini models that users can choose from:
- Gemini 3 Pro Preview (NEXT-GEN) - Maximum reasoning power for complex analysis
- Gemini 3 Flash Preview (HYPER-SPEED) - Instant responses for real-time feedback
- Gemini 2.5 Pro (REASONING) - Deep analytical capabilities
- Gemini 2.5 Flash (BALANCED) - Default, best all-around performance
- Gemini 2.5 Flash Lite (EFFICIENT) - Low-latency for quick operations
Key AI Features Powered by Gemini
1. Nightly Skill Analysis Every night at 2:00 AM:
- Harvests all submissions from the day
- Sends them to the user's selected Gemini model with detailed prompts
- Gemini identifies which algorithmic skills were demonstrated
- Returns confidence deltas (-15 to +10) for each skill
- Updates "Skill DNA" profile automatically
2. Personalized Drill Generation When you request practice drills:
- Identifies weakest skills (confidence < 40) from Skill DNA
- Gemini generates 3 micro-drills per weak skill
- Returns structured JSON with drill content, answers, and explanations
- Calibrates difficulty to your current skill level
3. AI Safe Observer for Muscle-Memory Drills For muscle-memory drills, I built a unique verification system:
- Gemini generates pseudo code for algorithmic patterns
- The AI Safe Observer converts pseudo code to executable Python
- Runs the code in a sandboxed environment with test cases
- Verifies correctness before presenting to users
- This ensures drills are not just theoretically correct but actually work
Why this matters: Traditional drill systems can't verify if generated code actually runs. My AI Safe Observer uses Gemini to create self-validating exercises.
4. Wrong Answer Analysis with RAG When you submit incorrect code:
- Extracts buggy code and error messages
- Generates embedding vector using Gemini's embedding API
- Searches vector database for similar past mistakes (cosine similarity > 0.92)
- Gemini provides root cause analysis with context from similar errors
- Stores new embedding for future RAG lookups
5. Historical Backfill Analysis On first install:
- Fetches historical LeetCode submissions via GraphQL
- Gemini analyzes batches of past submissions
- Assigns skill tags and confidence scores
- Rebuilds complete Skill DNA from history
- Rate-limited to 1 request per 500ms to avoid API throttling
How I built it
Architecture:
- Chrome Extension (Manifest V3) with service worker architecture
- Build System: Vite for module bundling with multiple entry points
- Frontend: Vanilla JavaScript with custom CSS theming (Sakura and Matrix themes)
- Storage: Chrome Storage Local API + Dexie.js for IndexedDB operations
- Testing: Jest for unit tests, Puppeteer for E2E browser automation
AI Integration:
- Primary AI Provider: Google Gemini (2.5 Pro, 2.5 Flash, 3 Flash Preview, 3 Pro Preview)
- Multi-provider support: OpenAI GPT-4, Anthropic Claude, and local models via Ollama/LM Studio as fallbacks
- LLMGateway abstraction layer for provider-agnostic AI calls with automatic Gemini model detection
- Vector database for RAG using Gemini's embedding API with cosine similarity search
- Fault isolation: Each Gemini operation wrapped in try-catch with graceful fallback ladders (Gemini → Template → Demo drills)
Key Technical Components:
- Content Scripts: Inject into LeetCode pages to detect submissions, show rating modals, and render the AI sidecar with Gemini-powered analysis
- Background Service Worker: Orchestrates nightly Gemini digest analysis, drill generation, and skill matrix updates
- FSRS Algorithm: Implements the full FSRS v4.5 formula with 17 optimized weights for calculating memory stability and optimal review intervals
- Backfill Agent: Rate-limited crawler that uses Gemini to rebuild Skill DNA from historical submissions via LeetCode's GraphQL API
- 🤖AI Safe Observer🛡️: Sandboxed Python execution environment that verifies Gemini-generated code from user's pesudo code entry actually works. Brings the project to an actual Action Era.
Robustness Patterns for Gemini Integration:
- Exponential backoff retry logic: Automatically retries failed Gemini requests (3 retries, 1s base delay)
- JSON extraction from markdown: Multi-pass parser handles Gemini's markdown-wrapped JSON responses
- Graceful degradation: 3-tier fallback system (Gemini → Template → Demo drills)
- Per-skill fault isolation: If Gemini fails for one skill, others still generate successfully
- Context loss handling: Detects Chrome extension invalidation and prompts refresh
- Deprecated model detection: Auto-upgrades from Gemini 1.5 to 2.5/3.0
Challenges I ran into
Chrome Extension Context Invalidation: Service workers can be terminated at any time, causing context loss. I had to implement robust message passing and storage synchronization to handle this gracefully.
LeetCode's Dynamic DOM: LeetCode is a single-page application that heavily modifies the DOM. I had to pre-cache problem metadata before submission and implement polling mechanisms to reliably detect submission results.
Gemini LLM Non-Determinism: Gemini sometimes returns malformed JSON or hallucinated invalid drill formats. I built a multi-pass JSON extractor with heuristic fallbacks and per-skill fault isolation to ensure one failure doesn't cascade.
FSRS Algorithm Complexity: Implementing the full FSRS v4.5 formula with 17 weights required deep understanding of memory science. I had to carefully tune parameters to balance review frequency with user burden.
Vector Database Performance: Initially used IndexedDB for Gemini embeddings, but cross-context access was slow. I migrated to Chrome Storage Local with optimized cosine similarity search.
Rate Limiting: Both LeetCode's API and Gemini API have rate limits. I implemented throttling (1 request per 500ms) and exponential backoff to avoid bans.
Gemini API Reliability: Gemini occasionally returns 500 errors during high load. I implemented exponential backoff retry logic to handle transient failures gracefully.
AI Safe Observer Security: Running user-generated code is dangerous. I had to build a sandboxed execution environment that safely runs Gemini-generated Python code without security risks.
Accomplishments that I'm proud of
Production-Grade SRS: Successfully implemented the state-of-the-art FSRS v4.5 algorithm, matching the quality of established tools like Anki.
Multi-Provider AI Architecture: Built a robust abstraction layer supporting 4 different AI providers with automatic fallbacks—users can choose between cloud APIs or fully local models for privacy, with Gemini as the primary provider.
AI Safe Observer: Created a unique sandboxed execution environment that verifies Gemini-generated code actually works before presenting it to users. This is a novel approach that ensures drill quality through automated testing.
Fault-Tolerant Agentic System: Created a reliable AI agent that handles non-deterministic Gemini outputs gracefully, ensuring the extension never breaks even when AI fails.
Beautiful UX: Designed dual themes (Sakura and Matrix) with animated heatmaps, smooth transitions, and intuitive interfaces that make learning feel delightful.
RAG Implementation: Built a working vector database with semantic search using Gemini's embedding API that dramatically improves wrong answer analysis by learning from past mistakes.
Comprehensive Testing: Achieved solid test coverage with both unit tests (Jest) and E2E browser tests (Puppeteer).
Gemini Integration Excellence: Successfully integrated 5 different Gemini models with intelligent routing, fallback handling, and model-specific optimizations for different use cases.
What I learned
Memory Science: Deep dive into spaced repetition research, FSRS algorithm design, and how to optimize learning schedules for long-term retention.
Chrome Extension Architecture: Mastered Manifest V3 patterns, service worker lifecycle management, and cross-context communication strategies.
Prompt Engineering for Gemini: Learned how to design robust prompts that minimize hallucination and extract structured data from Gemini reliably. Discovered that Gemini 3 Flash responds better to concise prompts, while Gemini 2.5 Pro benefits from detailed context.
Fault-Tolerant Design: Discovered that building on top of non-deterministic systems (Gemini LLMs) requires multiple layers of validation, fallbacks, and graceful degradation.
Vector Embeddings: Gained hands-on experience with semantic search, cosine similarity, and RAG patterns using Gemini's embedding API for improving AI responses with context.
UX for Learning Tools: Understood the importance of balancing information density with simplicity—showing FSRS metadata without overwhelming users.
API Optimization: Learned to balance cost, latency, and quality by choosing the right Gemini model for each task—Flash for speed-critical features, Pro for complex reasoning.
Sandboxed Code Execution: Built secure execution environments for running AI-generated code safely, which is critical for the AI Safe Observer feature.
What's next for Make LC Easy Again
Planned Features:
Cross-Platform Sync: Add mobile and tablet versions with cloud synchronization, allowing seamless practice across devices.
Spaced Repetition for Drills: Currently, drills are generated based on weak skills but don't have their own SRS scheduling. I'll implement FSRS for drills so they reappear at optimal intervals for maximum retention.
Customizable Drill Focus: Allow users to specify what they want to practice:
- Language syntax (Python/Java/C++ specific patterns)
- Algorithm thinking (high-level problem-solving strategies)
- Problem-specific techniques (edge cases for particular questions)
Advanced Analytics: Add detailed progress tracking with:
- Skill confidence trends over time
- Predicted mastery dates per topic
- Personalized study recommendations powered by Gemini
Community Drill Library: Enable users to share and rate drills, building a crowdsourced collection of high-quality practice exercises.
Interview Mode: Simulate real interview conditions with timed drills, whiteboard-style interfaces, and behavioral question integration.
Security Patches: Add more security methods to make the project production-ready beyond hackathon scope, including enhanced sandboxing for the AI Safe Observer and additional input validation.
Gemini Streaming Responses: Implement streaming for real-time feedback during wrong answer analysis, making the AI feel more responsive and interactive.
Multi-Language Support: Expand beyond English using Gemini's multilingual capabilities to support learners worldwide.
Enhanced AI Safe Observer: Expand sandboxed execution to support more languages (Java, C++, JavaScript) beyond Python, all verified by Gemini-generated test cases.
Built With
- css
- dexie
- e2b
- fastapi
- gemini
- html
- i18n
- indexeddb
- javascript
- jest
- manifest
- mcp
- puppeteer
- pydantic
- python
- rag
- uvicorn
- vite

Log in or sign up for Devpost to join the conversation.