LeetCode Toolkit

Copy problem as Markdown, Download as Jupyter Notebook, Format on Save, Unlock Editorial & IntelliSense

作者
eclipher
今日安裝
0
安裝總數
0
評價
0 0 0
版本
2.1.0
建立日期
2025-04-08
更新日期
2025-04-13
尺寸
196.4 KB
授權條款
MIT
腳本執行於

LeetCode Toolkit

https://github.com/eclipher/leetcode-jupyter

Feature

This userscript enhances the LeetCode problem page with various tweaking and additions. It supports both the US version of LeetCode.com, and the China version.

  • At the top of problem description, these buttons are added:
    • Copy Title
    • Copy Description: Copies the problem description in Markdown format, making it easy to paste into your notes or documentation.
    • Download as Jupyter Notebook: Bundles the title, description in Markdown, and the current content in the code editor into a single .ipynb file.
    • Find Editorial: Open a screenshot of the Editorial for the current problem, if it exists in the Leetcode Screenshotter repo.
      • This is for US site only, as China site do not seem to lock their editorials behind premium.
  • Quality-of-life adjustments:
    • Format On Save: Automatically format code when pressing Ctrl + S.
    • Unlock IntelliSense: Enjoy autocompletion and hover suggestions without paying for premium.

About Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.

This userscript helps you transfer LeetCode problems into a Jupyter Notebook document, so you can read the problem, write and run the solution, add additional notes, all at one place on your local machine.

You can open .ipynb notebooks with clients such as VS Code. By default it supports Python, but kernels for many other languages are available too.

Installation

To use this userscript, you'll need a userscript manager like Tampermonkey (available for Chrome, Firefox, and other browsers).

  1. Install Tampermonkey or a similar userscript manager for your browser.
  2. Download and install the userscript.
  3. Visit a LeetCode problem page, and you should see the new features added by the script.

Credits

This script is inspired by the following projects:

License

MIT License

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址