Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 1.82 KB

README.md

File metadata and controls

85 lines (61 loc) · 1.82 KB

LeetCode

LeetCode TOC

LeetCode Practice TOC 目录

Language

  • TypeScript
  • Python3

Usage

Generate TOC

yarn generate:TOC

Lint

ESLint

  • husky
  • lint-staged
yarn lint

Cli

Link Cli

开始解题

yarn start

跟随提示,输入题目 ID,标题,索引,难易度,将会自动建立对应文件夹并记录信息至 package.json

结果检验注意事项,为满足多参数输入,传参用 [ ] 包裹。

// function findNumberIn2DArray(matrix: number[][], target: number): boolean {}
const testcases = [
  [
    [
      [1, 4, 7, 11, 15],
      [2, 5, 8, 12, 19],
      [3, 6, 9, 16, 22],
      [10, 13, 14, 17, 24],
      [18, 21, 23, 26, 30],
    ],
    5,
  ],
  [
    [
      [1, 4, 7, 11, 15],
      [2, 5, 8, 12, 19],
      [3, 6, 9, 16, 22],
      [10, 13, 14, 17, 24],
      [18, 21, 23, 26, 30],
    ],
    20,
  ],
]
const expectedReults = [true, false]

解题完毕

yarn solve

输入对应题目 ID,将会通过自动提交带有题目信息的 commit

如:git commit -m "✅ solve palindrome-number"