Vscode Leetcode

Solve LeetCode problems in VS Code
Alternatives To Vscode Leetcode
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Cs Notes167,129
13 hours ago188
:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计
Fucking Algorithm119,578
2 days ago360Markdown
刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.
Interviews60,220
a month ago113mitJava
Everything you need to know to get the job.
Leetcode52,422
6 days ago7otherJavaScript
LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)
Leetcode Master42,139
20 hours ago137Shell
《代码随想录》LeetCode 刷题攻略:200道经典题目刷题顺序,共60w字的详细图解,视频难点剖析,50余张思维导图,支持C++,Java,Python,Go,JavaScript等多语言版本,从此算法学习不再迷茫!🔥🔥 来看看,你会发现相见恨晚!🚀
Hello Algorithm32,412
3 months ago7Java
🌍 针对小白的算法训练 | 包括四部分:①.大厂面经 ②.力扣图解 ③.千本开源电子书 ④.百张技术思维导图(项目花了上百小时,希望可以点 star 支持,🌹感谢~)推荐免费ChatGPT使用网站
Hello Algo30,457
11 hours ago17otherJava
《Hello 算法》:动画图解、一键运行的数据结构与算法教程,支持 Java, C++, Python, Go, JS, TS, C#, Swift, Rust, Dart, Zig 等语言。
Leetcode Go30,134
2 months ago15mitGo
✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解
Interview29,284
3 months ago15otherC++
📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.
Leetcode23,311
12 hours ago1February 17, 2022cc-by-sa-4.0Java
😏 LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解
Alternatives To Vscode Leetcode
Select To Compare


Alternative Project Comparisons
Readme

LeetCode

Solve LeetCode problems in VS Code

  • English Document |

Attention - Workaround to login to LeetCode endpoint

Note: If you are using leetcode.cn, you can just ignore this section.

Recently we observed that the extension cannot login to leetcode.com endpoint anymore. The root cause of this issue is that leetcode.com changed its login mechanism and so far there is no ideal way to fix that issue.

Thanks for @yihong0618 provided a workaround which can somehow mitigate this. Now you can simply click the Sign In button and then select Third Party login or Cookie login.

Note: If you want to use third-party login(Recommended), please make sure your account has been connected to the third-party. If you want to use Cookie login, click here to see the steps.

Requirements

  • VS Code 1.30.1+
  • Node.js 10+

    NOTE: Please make sure that Node is in your PATH environment variable. You can also use the setting leetcode.nodePath to specify the location of your Node.js executable.

Quick Start

demo

Features

Sign In/Out

Sign in

  • Simply click Sign in to LeetCode in the LeetCode Explorer will let you sign in with your LeetCode account.

  • You can also use the following command to sign in/out:

    • LeetCode: Sign in
    • LeetCode: Sign out

Switch Endpoint

Switch Endpoint

  • By clicking the button btn_endpoint at the explorer's navigation bar, you can switch between different endpoints.

  • The supported endpoints are:

    • leetcode.com
    • leetcode.cn

    Note: The accounts of different endpoints are not shared. Please make sure you are using the right endpoint. The extension will use leetcode.com by default.


Pick a Problem

Pick a Problem

  • Directly click on the problem or right click the problem in the LeetCode Explorer and select Preview Problem to see the problem description.

  • Select Show Problem to directly open the file with the problem description.

    NoteYou can specify the path of the workspace folder to store the problem files by updating the setting leetcode.workspaceFolder. The default value is**$HOME/.leetcode/**.

    You can specify whether including the problem description in comments or not by updating the setting leetcode.showCommentDescription.

    You can switch the default language by triggering the command: LeetCode: Switch Default Language.


Editor Shortcuts

Editor Shortcuts

  • The extension supports 5 editor shortcuts (aka Code Lens):

    • Submit: Submit your answer to LeetCode.
    • Test: Test your answer with customized test cases.
    • Star/Unstar: Star or unstar the current problem.
    • Solution: Show the top voted solution for the current problem.
    • Description: Show the problem description page.

    Note: You can customize the shortcuts using the setting: leetcode.editor.shortcuts. By default, only Submit and Test shortcuts are enabled.


Search problems by Keywords

Search problems by Keywords

  • By clicking the button btn_search at the explorer's navigation bar, you can search the problems by keywords.

Manage Session

Manage Session

  • To manage your LeetCode sessions, just clicking the LeetCode: *** at the bottom of the status bar. You can switch between sessions or create, delete a session.

Settings

Setting Name Description Default Value
leetcode.hideSolved Specify to hide the solved problems or not false
leetcode.showLocked Specify to show the locked problems or not. Only Premium users could open the locked problems false
leetcode.defaultLanguage Specify the default language used to solve the problem. Supported languages are: bash, c, cpp, csharp, golang, java, javascript, kotlin, mysql, php, python,python3,ruby,rust, scala, swift, typescript N/A
leetcode.useWsl Specify whether to use WSL or not false
leetcode.endpoint Specify the active endpoint. Supported endpoints are: leetcode, leetcode-cn leetcode
leetcode.workspaceFolder Specify the path of the workspace folder to store the problem files. ""
leetcode.filePath Specify the relative path under the workspace and the file name to save the problem files. More details can be found here.
leetcode.enableStatusBar Specify whether the LeetCode status bar will be shown or not. true
leetcode.editor.shortcuts Specify the customized shortcuts in editors. Supported values are: submit, test, star, solution and description. ["submit, test"]
leetcode.enableSideMode Specify whether preview, solution and submission tab should be grouped into the second editor column when solving a problem. true
leetcode.nodePath Specify the Node.js executable path. for example, C:\Program Files\nodejs\node.exe node
leetcode.showCommentDescription Specify whether to include the problem description in the comments false
leetcode.useEndpointTranslation Use endpoint's translation (if available) true
leetcode.colorizeProblems Add difficulty badge and colorize problems files in explorer tree true
leetcode.problems.sortStrategy Specify sorting strategy for problems list None

Want Help?

When you meet any problem, you can check out the Troubleshooting and FAQ first.

If your problem still cannot be addressed, feel free to reach us in the Gitter Channel or file an issue.

Release Notes

Refer to CHANGELOG

Acknowledgement

Popular Leetcode Projects
Popular Algorithms Projects
Popular Learning Resources Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Algorithms
Vscode
Data Structures
Interview
Leetcode