Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>leetcoderNew to Visual Studio Code? Get it now.
leetcoder

leetcoder

djl-l-ghh

|
150 installs
| (0) | Free
personal test
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

leetcoder

fork自 'https://github.com/supperchong/algorithm' 根据个人使用习惯进行了修改和部分改进。

主要功能

参考vscode-leetcode的功能

特色

  • 1.引入自己编写的库leetcoder,使得本地环境与leetcode一致

    • lodash.js 库默认被包含。
    • 队列/优先队列,可使用 datastructures-js/priority-queue 和 datastructures-js/queue。
  • 2.本地 test 与 debug

    • 代码里包含默认测试用例
    • 支持自定义添加测试用例,点击test之后在本地运行测试用例
    vscode-leetcode 插件的 test 功能是将本地内容上传至 leetcode 网站,由 leetcode实现 test,存在速度问题,并且不能在本地 debug.
    
  • 3.submit之后显示失败的测试用例并提取到编辑区,方便之后的test,debug

完整流程gif

how to use it

主要改变

主要针对 ts 和 js 刷题进行了改变。
  • 1.bug 修复:
    • 设计类的情况(例如703)原作者未考虑到
      • test
      • debug
      • submit 之后测试用例的提取
    • npm下载包时依赖情况无法处理
    • 不支持ts的 debug
      • 小 bug, sourceMap 没有开启
  • 2.小优化
    • codelens 的抖动现象消除
    • 默认包含lodash

收获

  • 学习了 typescript
  • node 的多进程,进程调试
  • 了解了模块化及打包工具
  • 编写 npm 包
    • 本地创建 leetcode 环境的代码集成到一个包里
  • 了解了AST
    • 使用 recast 实现添加注释的功能
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft