CPH Leetcode is a Visual Studio Code extension designed to streamline competitive programming workflows by integrating Leetcode functionalities directly into the editor. Solve problems, fetch test cases, and run solutions—all without leaving VS Code!
- Works with LeetCode
- Fetch sample test cases for problems and store them locally.
- Run solutions against fetched test cases directly in VS Code with real-time results.
- Access features through the CPH Leetcode UI in the VS Code activity bar.
- Shows discrepancies if actual output does not match expected output.
- Video Link: Loom Link
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
- Search for
Competitive Programming Helper: Leetcode (cph-lc)
. - Click Install to install the extension.
Alternatively, you can install directly from the Visual Studio Marketplace.
- After installation, navigate to the CPH Leetcode view in the activity bar.
- Use the following commands from the Command Palette:
- CPH: Fetch Test Cases: Fetch sample test cases for a problem.
- CPH: Run Test Cases: Execute your code against the fetched test cases.
Alternatively, you can interact with the UI in the activity bar and perform the same actions.
- C++
- Python3
- Support for Java
- Feature for user to extract test cases for Leetcode daily challenge from extension itself
- Allow users to change default storage folder for test cases (which is currently "TestData" in same working directory)
- icons: Contains the logo and icons for the extension.
- helper-functions/: Includes utility functions for test case fetching, test case execution, and to fetch HTML for the UI of Extension.
- extension.js: Main Logic for the extension goes here.
- final.py: Python script to fetch sample test cases from desired URL.
Contributions are welcome! To contribute:
- Fork this repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add a new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️ by Akash. If you find this extension helpful, please give it a ⭐ on GitHub.
Also, if you encounter any issues, or have any questions, feel free to contact me at akashsingh242678@gmail.com