LeetCode
Debug LeetCode C/C++ problems locally.
Install / Use
/learn @Pokerpoke/LeetCodeREADME
LeetCode C++ 本地调试环境
注 适用于Ubuntu/WSL
详细用法参见使用VSCode进行LeetCode C++本地调试
依赖
-
cmake
-
googletest
-
Ubuntu20.04及以上执行:
sudo apt install build-essential cmake libgtest-dev
创建新git分支
项目为了不污染master分支,解答放到了solutions分支下,如果直接fork过去可以直接在master分支上提交题解,单独创建solutions分支也可以。
生成模板并调试运行
通过复制或者提供的脚步生成模板,将会在src目录下生成相应模板,根据题目进行修改相关函数名称即可。
脚本使用${ID}.${SOLUTION_NAME}.cc的方式创建文件
./generate_template ${ID}.${SOLUTION_NAME}
调试运行,执行脚本或者在VSCode中点击CMake扩展的Debug按钮。
./leetcode ./src/${ID}.${PROBLEM_NAME}
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
