LeetLens is a powerful Chrome Extension that integrates directly into LeetCode. It acts as your personal AI mentor, helping you understand complex algorithms, visualize execution traces, review your code, and intelligently compare your approach with optimal solutions.
Get instant, senior-engineer-level code reviews on correctness, complexity, and edge cases.

Understand recursion trees, variables, and logic flow step-by-step.

Compare your specific brute-force approach against the optimal solution.

Find targeted practice problems based on the exact logic of the problem you just solved.

Track your performance, visualizations, and get personalized recommendations on what to learn next.

Stuck on a problem? Ask the AI specific questions about your code without revealing the full solution.

Instantly view problem descriptions, examples, constraints, and your personalized notes in a clean UI.

- Solution Review Engine: Get instant, senior-engineer-level code reviews. Analyzes your solution for correctness, time/space complexity, edge cases, and provides suggestions for improvement.
- Execution Trace Visualizer: Watch your algorithm run step-by-step. Understand variable states, recursion trees, and loop iterations visually.
- Intelligent Comparison: Compare your specific code against the optimal approach (e.g., O(N²) Brute Force vs. O(N) Optimal). Understand the exact tradeoffs.
- Concept Reinforcement & Learning Paths: Identifies your weak spots and suggests what patterns to learn next based on your history.
- Bring Your Own Key: Use your preferred AI model! Connect your API key for Google Gemini, OpenAI, or OpenRouter.
- Privacy-First & Secure: Communicates with the AI securely from a background service worker to respect your privacy and bypass restrictive content security policies.
Currently, LeetLens is not published on the Chrome Web Store, so you can easily install it directly from this repository!
-
Clone or Download the Repository
git clone https://github.com/Slash-495/LeetLens.git cd LeetLens -
Install Dependencies & Build Ensure you have Node.js installed, then run:
npm install npm run build
This will generate a
distfolder containing the compiled extension. -
Load into Chrome
- Open Google Chrome and go to
chrome://extensions/ - Turn on "Developer mode" (toggle switch in the top right corner).
- Click the "Load unpacked" button in the top left.
- Select the newly generated
distfolder inside yourLeetLensdirectory.
- Open Google Chrome and go to
-
Start Coding!
- Head over to LeetCode and open any problem.
- Click the LeetLens floating button in the bottom right corner.
- Go to Settings (⚙️ icon) to enter your AI API key (e.g., Google AI Studio).
- Write some code and ask for a review!
To use LeetLens, you must provide your own API key. We recommend Google Gemini for lightning-fast, free-tier developer access.
- Go to Google AI Studio.
- Click Create API Key.
- Open the LeetLens extension panel on LeetCode.
- Click the Settings (⚙️) icon in the header.
- Select "Gemini", paste your key, and click Save.
Note: The free tier of Gemini API limits you to 15 requests per minute. If you exceed this, just wait 60 seconds!
- React 18 & TypeScript
- Vite & CRXJS Vite Plugin
- Tailwind CSS
- Lucide React (Icons)
- Framer Motion (Animations)
Encountered an issue or have an idea for a cool new feature? Please open an issue on this repository!
Disclaimer: LeetLens is not affiliated with, maintained, authorized, endorsed, or sponsored by LeetCode.