Skip to content

Repository files navigation

πŸ€– Leehint - AI-Powered LeetCode Hints

Ever stared at a LeetCode problem for 30 minutes wondering if you're close or completely lost?

Leehint is a Chrome Extension that gives you progressive AI-generated hints while solving LeetCode problems. Instead of instantly revealing the answer, it nudges you in the right direction step-by-step, helping you actually learn and improve your problem-solving skills.


✨ Features

πŸ’‘ Level 1 Hint

Get a subtle hint about the approach without revealing the solution.

πŸ” Level 2 Hint

Receive a more detailed explanation that guides your thinking process.

🧠 Full Solutions

Still stuck? Generate complete solutions in:

  • Python
  • Java
  • C++

πŸ“‹ One-Click Code Copy

Copy generated solutions directly from the extension.

πŸ’Ύ Session Persistence

Your hints stay saved even if you close the popup and reopen it later.

πŸ”„ Reset Anytime

Starting a new problem? Reset the extension state with a single click.


πŸ› οΈ How It Works

  1. Open any LeetCode problem.

  2. Click the Leehint extension icon.

  3. The extension automatically reads:

    • Problem statement
    • Your current code
  4. Sends the context to Gemini.

  5. Generates:

    • Level 1 Hint
    • Level 2 Hint
    • Full Solution (if requested)

The goal is to help you think through the problem instead of simply copying answers.


πŸ“‚ Project Structure

Leehint/
β”‚
β”œβ”€β”€ manifest.json       # Chrome extension configuration
β”œβ”€β”€ popup.html          # Extension UI
β”œβ”€β”€ popup.js            # Main extension logic
β”œβ”€β”€ content.js          # Extracts LeetCode problem + code
β”œβ”€β”€ style.css           # UI styling
β”œβ”€β”€ icon.png            # Extension icon
└── config.js           # Gemini API Key (not included)

βš™οΈ Installation

1. Clone the Repository

git clone https://github.com/yourusername/leehint.git

2. Add Your Gemini API Key

Create a file named:

config.js

Add:

const GEMINI_API_KEY = "YOUR_API_KEY_HERE";

3. Load Extension in Chrome

  1. Open Chrome
  2. Go to:
chrome://extensions
  1. Enable Developer Mode
  2. Click Load Unpacked
  3. Select the project folder

Done πŸŽ‰


🧩 Technologies Used

  • JavaScript
  • Chrome Extension API (Manifest V3)
  • Google Gemini API
  • HTML
  • CSS
  • Marked.js

🎯 Why I Built This

While solving LeetCode, I often found myself stuck between two bad choices:

  • Spend hours making no progress.
  • Open the solution and spoil the entire problem.

I wanted something in between.

Leehint acts like a coding mentor that gives hints progressively, allowing you to keep ownership of the solution while still getting help when needed.


🚧 Future Improvements

  • Support for more programming languages
  • Better hint personalization
  • Dark/Light theme support
  • Hint history
  • Difficulty-based guidance
  • Support for other coding platforms

⭐ Support

If you found this project useful, consider giving it a star.

It motivates me to build more developer tools and open-source projects.

Happy Coding! πŸš€

About

πŸ€– AI-powered Chrome extension that provides progressive LeetCode hints and solutions using Gemini API. Learn without instantly spoiling the answer. πŸ’‘πŸ§ πŸ”₯

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages