基于 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 调试
- 在 VSCode 中需要调试的文件中设置断点
- 打开调试面板 (F5)
- 选择 "Mocha" 并点击 "运行"
vscode安装leetcode-leetcode-typescript:leetcode打字稿
预估大小:103个文件
launch.json
488B
treeNode.ts
1KB
test.ts
884B
index.ts
1KB
index.ts
1KB
index.ts
1KB
test.ts
877B
index.ts
1KB
index.ts
1000B
index.ts
953B
75KB
文件大小:
评论区