Giter VIP home page Giter VIP logo

vscode-leetcode's Introduction

LeetCode

Solve LeetCode problems in VS Code

Requirements

  • VS Code 1.23.0+
  • Node.js 8+

    NOTE: Please make sure that Node is in your PATH environment variable. You can check this by running: node -v.

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

    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

  • Right click the problem in the LeetCode Explorer and select Show 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 the active file as the answer.

Test the Answer

Test the Answer

  • To test your answer, right click in the editor and select Test 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 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 a new 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, python,python3,ruby,scala,swift 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

Troubleshooting

When you meet any problem, you can check the Troubleshooting page first.

Release Notes

Refer to CHANGELOG

Acknowledgement

vscode-leetcode's People

Contributors

himself65 avatar jdneo avatar ntt2k avatar purocean avatar tsfreddie avatar vigilans avatar xeonacid avatar

Watchers

 avatar

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.