Hello! This is my repository containing solutions to problems from the Leet Code platform.
[Dependences/package.json]
"devDependencies": {
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2"
}
This repository has three different folders: /easy
, /medium
, and /hard
. Each folder represents a different difficulty level as shown on LeetCode.
In each folder, there are multiple files. Files with the format myChallengeSolution.ts
contain my solution for the challenge, and files with the format myChallengeSolution.test.ts
contain my test cases for the challenge.
- Install NPM dependences
npm i
- Run all test cases
npm run test
This repository includes some scripts that can help you if you decide to fork or clone it.
"scripts": {
"test": "jest",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier --write ."
},
- Run test cases
npm run test
- Run ESLint for TypeScript
npm run lint
- Run ESLint and fix problems
npm run lint:fix
- Run to format all files
npm run format