-
Notifications
You must be signed in to change notification settings - Fork 672
🚀 Daily Challenges & Smart C++ Templates - Enhanced LeetCode VS Code Extension #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
su-mt
wants to merge
11
commits into
LeetCode-OpenSource:master
Choose a base branch
from
su-mt:feature/daily-challenges
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add new Daily category to LeetCode Explorer - Implement getTodayProblem() and getDailyChallengeHistory() methods - Add C++ headers generation for code templates - Integrate daily challenges in TreeDataProvider and ExplorerNodeManager - Add caching mechanism for daily challenges (30-minute cache) - Support both LeetCode.com and LeetCode.cn endpoints - Add documentation for implementation details Features: - 📅 Daily Challenges section in Explorer - ⚡ Cached daily challenge data for better performance - 🌍 Multi-language support with translation options - 🔧 Enhanced C++ template generation - 📊 Historical daily challenge tracking (30 days) This implementation fetches daily coding challenges from LeetCode GraphQL API and displays them in a dedicated section of the VS Code Explorer panel.
- Add enhanced README.md with feature overview and installation guide - Add FORK_CHANGES.md with detailed technical changes summary - Preserve original README as README_ORIGINAL.md - Include visual comparisons and performance metrics - Add contribution guidelines specific to this fork
- Add enhanced README.md with feature overview and installation guide - Add FORK_CHANGES.md with detailed technical changes summary - Preserve original README as README_ORIGINAL.md - Include visual comparisons and performance metrics - Add contribution guidelines specific to this fork
- Auto-parse test data from markdown - Detect types (vector<string>, vector<int>, etc.) - Extract real method names - Match parameter counts - Decode HTML entities - Updated docs and dependencies"
…t parsing - ✨ Intelligent test data extraction from LeetCode markdown descriptions - 🔍 HTML entity decoding (" → ") for proper string handling - 🧠 Smart type detection (vector<string>, vector<int>, string, int, bool, double) - 🎯 Real method name extraction from class definitions - 📊 Parameter count matching between function signature and test data - 🚫 Duplicate data elimination with smart deduplication logic - 📋 Comprehensive markdown parsing supporting multiple Input formats - 🔧 Auto-generation of ready-to-run debug templates with real test cases - 📚 Updated README with demo GIF and detailed feature documentation - 📦 Added extensionPack for automatic C++/Python extension installation
Hello! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Enhanced LeetCode VS Code Extension - Daily Challenges & Smart C++ Templates
This PR introduces significant enhancements to the LeetCode VS Code extension, adding Daily Challenges support and intelligent C++ debug template generation.
✨ Key Features Added
📅 Daily Challenges Integration
🔧 Enhanced C++ Debug Templates
#include <iostream>
,<vector>
, etc.)vector<string>
,vector<int>
,string
,int
,bool
,double
twoSum
,isValid
) instead of placeholders"
→"
and other HTML entities🎯 Before vs After
Before:
After:
🛠️ Technical Implementation
Files Modified
src/leetCodeExecutor.ts
- Core engine with GraphQL integration and enhanced parsingsrc/shared.ts
- Extended IProblem interface with titleSlug supportsrc/explorer/explorerNodeManager.ts
- Daily challenges caching and managementsrc/explorer/LeetCodeTreeDataProvider.ts
- UI integration for daily challengespackage.json
- Extension pack configuration for auto-dependenciesREADME.md
- Comprehensive documentation and feature demosNew Dependencies
ms-vscode.cpptools
andms-python.python
API Integration
🎪 Feature Highlights
1. Daily Challenges Complete Integration
2. Smart C++ Code Generation
#include
statementsvector<string>
,vector<int>
,string
,int
,bool
,double
3. Advanced Parsing Engine
"
→"
,&
→&
, etc.4. Performance & Reliability
📊 Technical Metrics
🧪 Testing Coverage
Unit Tests Added
test_graphql_method.js
test_graphql_parser_integration.js
test_daily_challenges_deduplication.js
test_param_count.js
test_vector_string.js
test_html_entities.js
Test Results
✅ GraphQL method works correctly ✅ Parser extracts test data from GraphQL content ✅ Deduplication takes only first occurrence of each variable ✅ Parameter count matching works correctly ✅ Type detection supports all major C++ types ✅ HTML entity decoding handles all common cases
📦 Installation & Setup
Ready for Production
Deployment Ready
🎯 Impact Summary
This enhancement transforms the LeetCode VS Code extension from a basic problem viewer into a comprehensive coding assistant with:
The result is a significantly more powerful and user-friendly extension that maintains full backward compatibility while adding substantial new value for competitive programmers and algorithm enthusiasts.