LeetCode Toolkit

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

2025-04-08 일자. 최신 버전을 확인하세요.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
개발자
eclipher
평점
0 0 0
버전
2.0.0
생성
2025-04-08
갱신
2025-04-08
크기
195KB
라이선스
MIT
동작 사이트

LeetCode Download as Jupyter Notebook

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

Feature

This userscript enhances the LeetCode problem page by adding three buttons:

  • 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.

Additionally, it also add these quality-of-life adjustment:

  • Format On Save: Automatically format code when pressing Ctrl + S.
  • Unlock IntelliSense: Enjoy autocompletion and hover suggestions without paying for premium.

The script supports both global site of LeetCode.com, and the China-specific site.

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 buttons added by the userscript.

Credits

This script is inspired by LeetCode Problem to Markdown.

License

MIT License