基于 TypeScript 的 LeetCode 问题解决方案与测试流程

LeetCode 问题 TypeScript 解决方案

本项目提供 LeetCode 问题的 TypeScript 解决方案,并包含以下特性:

  • 分析时间和空间复杂度
  • 基于 Node.js (ts-node) 运行
  • 使用 Nodemon 自动监控文件变化并重启
  • 使用 Mocha 进行全面测试

测试

$ npm test

使用 Nodemon 自动监控并重启

安装 Nodemon (仅首次需要)

$ npm install -g nodemon

启动项目

$ npm start ${project/file}

VSCode 调试

  1. 在 VSCode 中需要调试的文件中设置断点
  2. 打开调试面板 (F5)
  3. 选择 "Mocha" 并点击 "运行"
folder
vscode安装leetcode-leetcode-typescript:leetcode打字稿 预估大小:103个文件
file
launch.json 488B
file
treeNode.ts 1KB
file
test.ts 884B
file
index.ts 1KB
file
index.ts 1KB
file
index.ts 1KB
file
test.ts 877B
file
index.ts 1KB
file
index.ts 1000B
file
index.ts 953B
file
index.ts 1013B
file
index.ts 937B
file
index.ts 1KB
file
index.ts 918B
file
test.ts 924B
file
tsconfig.json 283B
file
README.md 549B
file
.gitignore 13B
file
package-lock.json 41KB
file
package.json 740B
zip 文件大小:75KB