Competitive Programming Helper (CPH)
A Visual Studio Code extension to help with competitive programming tasks, particularly focused on LeetCode problem solving.
Features
- 🔍 Automatically fetch test cases from LeetCode problems
- ⚡ Run your code against multiple test cases
- 📊 View test results in a clean, organized interface
- ✏️ Add custom test cases
- 🔧 Support for multiple programming languages (C++, Python)
- 🛠️ Configurable compilation and execution commands
Installation
- Clone the repository from GitHub using
git clone https://github.com/your-username/cph-extension.git
- Open the cloned repository in VS Code
- run
npm install to install the dependencies.
- press F5 key to run the extension in local mode.
- New tab will be opened in VS Code with the extension loaded.
- Open folder with your solution file.
Usage
Fetching Test Cases
- Open your solution file in VS Code
- Press
Ctrl+Shift+P (or Cmd+Shift+P on macOS) to open the command palette
- Type "CPH: Fetch Test Cases" and press Enter
- Enter the LeetCode problem URL when prompted
Running Tests
- Open your solution file
- Press
Ctrl+Shift+P (or Cmd+Shift+P on macOS)
- Type "CPH: Run Test Cases" and press Enter
Adding Custom Test Cases
- Press
Ctrl+Shift+P (or Cmd+Shift+P on macOS)
- Type "CPH: Add Custom Test Case"
- Enter your input and expected output when prompted
Supported Languages
Configuration
You can customize the compilation and execution commands in your VS Code settings:
| |