Code Monkey home page Code Monkey logo

leetcode-explained's Introduction

Leetcode Explained

Downloads Rating Version License: MIT

A free, open source browser extension that enhances Leetcode problems with code solutions, video explanations, and GPT code analysis.

Chrome Firefox Chrome

Features

1️⃣ Solution videos: Adds the top 5 youtube solution videos into each problem

2️⃣ Complexity Analysis Reads your code and gets the time & space complexity using GPT

3️⃣ Code Generation Reads your code, fixes bugs, and generates the optimal solution code for the given problem using GPT. For more accurate results, open the description tab so GPT can read the problem's description and constraints.

4️⃣ Elo ratings Adds difficulty ratings into weekly/biweekly contest problems (~1500 added)

5️⃣ Hard Mode Hide the Leetcode problem examples to simulate a real coding interview environment. Available through the extension's settings.

⚙️ Installation

  1. git clone https://github.com/zubyj/leetcode-explained.git
  2. cd leetcode-explained
  3. npm install && tsc
  4. Open Google Chrome and navigate to chrome://extensions in the search bar.
  5. Enable "Developer mode" (top right corner).
  6. Click on "Load unpacked" and navigate to the extension directory, then click "Select".
  7. Pin the extension. You should now see the extension icon next to the address bar.

Now you can test the latest dev version and contribute new features! After you make changes, remember to run tsc to compile the TS files into javascript.

📚 Tutorial

For solution videos open a Leetcode problem's solutions tab

If you pin the extension in the toolbar & login into ChatGPT in your browser, you can use the following 2 GPT buttons:

  • Get your code complexity using ChatGPT
  • Fix bugs in your code and return the optimal solution

Please ensure your Leetcode solution is open so the extension can read your code from the page.

Contributing

We welcome contributions! Please see the CONTRIBUTING.md for details on how to contribute to the project.

Screenshots

Add Video

Code Complexity

Fix Code

Code of Conduct

We aim to foster an inclusive and respectful environment. Please read the CODE_OF_CONDUCT.md for more information.

License

Leetcode Explained is MIT licensed.

Support

If you encounter any issues or have any questions, please open an issue on this repository.

Privacy

This extension doesn't collect any personal data. All the code analysis and generation happens on your local machine.

If you like the extension, please leave a review in the Reviews tab. For questions or bugs, feel free to open an issue on Github.

References

Check out these cool datasets used in Leetcode Explained

Problem elo ratings

leetcode-explained's People

Contributors

zubyj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leetcode-explained's Issues

Modifications in company.html

I think it will be helpful to add the total number of easy, medium, and hard questions on the company page somewhere (maybe on top). This will give the viewer a clear idea about what bracket a particular company usually asks the questions from.

It would also be a good addition to add S.No as the first column in the table on the same company.html page.

If you have any other modifications, I am willing to take those up and contribute to the project.

Panels hidden when logged into LC

System info:
Brave Browser -> [Version 1.58.135 Chromium: 117.0.5938.140 (Official Build) (x86_64)]
---

While trying to use the extension I couldn't figure out why I wasn't being able to see anything on the panels(company tags or videos solutions on the solutions window).

Then noticed how the extension panel is hidden behind Leetcode's panels (see img):
Screenshot 2023-10-08 at 7 21 08 PM

However when logged out of LC the extension works perfectly (see img):
Screenshot 2023-10-08 at 7 28 46 PM

Screenshot 2023-10-08 at 7 29 02 PM

Random neetcode videos getting added to solutions

Since neetcode videos are popular, theyre sometimes within top 5 search results of random videos. So a better way to build the json would be to find all 338 matching neetcode videos and add them to the json. then go through the rest and add all the videos that dont have neetcode in the title.

Add premium status to the company specific question bank

After clicking on a company tag I get to a list of the questions the company has asked as well as the ability to search through other questions by other companies which is a really great feature. Could you please add whether the question requires premium access or not?

This way end-users don't have to click on the problem to find out that it requires problems and could potentially sort by problems that are available for free.

Thanks
Jordan

Use webextension-polyfill

All chrome api references should be replaced with browser

chrome.tabs.function -> browser.tabs.function

Dragging the leetcode resize bar delays the iframe pointer event by 1 second

If you drag the bar in the center of a leetcode problem and dont hover the iframe.
When you let it go, and try to play the video within 1 second it doesnt work.

The issue might be that when the mousedown event is triggered, the pointer-events style of the iframe element is set to none, which means that the iframe will not receive mouse events until it's set back to auto. This is causing a delay when you click on the iframe element after the mouseup event.

Add the missing solution videos to leetcode_solutions.json

Theres 2600 Leetcode problems. The first 700 have been added along with every problem that Neetcode did.

Add the other 1900 solutions.

To do this,

  1. Write a python script to read the JSON
  2. Use the Youtube Data API to search for the problem name. (append "Leetcode" in the search query for better results)
  3. Get the top 5 results and store them in the problem's videos array.

Extension for Mozilla Firefox

We could create the same extension for Firefox, will the new ad-block changes coming there will be a lot of users shifting to Firefox from Chrome, so this would be a great addition.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.