Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Solve LeetCode problems in VS Code

License

NotificationsYou must be signed in to change notification settings

python6460/vscode-leetcode

 
 

Repository files navigation

Solve LeetCode problems in VS Code

Requirements

  • VS Code 1.23.0+
  • Node.js 8+

    NOTE: Please make sure thatNode is in yourPATH environment variable. You can check this by running:node -v.

Quick Start

demo

Features

Sign In/Out

Sign in

  • Simply clickSign in to LeetCode in theLeetCode Explorer will let yousign 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 buttonbtn_endpoint at theexplorer's navigation bar, you can switch between different endpoints.

  • The supported endpoints are:

    • leetcode.com
    • leetcode-cn.com

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


Pick a Problem

Pick a Problem

  • Right click the problem in theLeetCode Explorer and selectShow Problem will generate a new file with the problem description for you.

    Note: If no folder is opened in VS Code, the extension will save the problem files in$HOME/.leetcode/.


Submit the Answer

Submit the Answer

  • You can submit the answer by clicking🙏 Submit to LeetCode at the bottom of the file. Or you can trigger the command:LeetCode: Submit to LeetCode to submit theactive file as the answer.

Test the Answer

Test the Answer

  • Totest your answer, right click in the editor and selectTest in LeetCode.

  • There are 3 ways to test the answer:

    • Test with the default cases
    • Write test cases in input box
    • Test with the written cases in file

Search problems by Keywords

Search problems by Keywords

  • By clicking the buttonbtn_search at theexplorer's navigation bar, you can search the problems by keywords.

Manage Session

Manage Session

  • To manage your LeetCode sessions, just clicking theLeetCode: *** at the bottom of the status bar. You canswitch between sessions orcreate a new session.

Settings

Setting NameDescriptionDefault Value
leetcode.hideSolvedSpecify to hide the solved problems or notfalse
leetcode.showLockedSpecify to show the locked problems or not. Only Premium users could open the locked problemsfalse
leetcode.defaultLanguageSpecify the default language used to solve the problem. Supported languages are:bash,c,cpp,csharp,golang,java,javascript,kotlin,mysql,python,python3,ruby,scala,swiftN/A
leetcode.useWslSpecify whether to use WSL or notfalse
leetcode.endpointSpecify the active endpoint. Supported endpoints are:leetcode,leetcode-cnleetcode
leetcode.outputFolderSpecify the relative path to save the problem files. Besides using customized path, there are also several reserved words which can be used here:
  • ${tag}: Categorize the problem according to their tags.
  • ${language}: Categorize the problem according to their language.
  • ${difficulty}: Categorize the problem according to their difficulty.
N/A

Troubleshooting

When you meet any problem, you can check theTroubleshooting Page first.

Release Notes

Refer toCHANGELOG

Acknowledgement

About

Solve LeetCode problems in VS Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp