This repository contains solutions to Neetcode problems implemented in TypeScript. The solutions are organized with tests for each problem to ensure correctness and reliability.
- Structured Codebase: Solutions are placed in the
src
directory, while tests are in thetests
directory. - Testing Framework: Uses Jest for testing.
- Code Quality: Includes ESLint and Prettier configurations to enforce code quality and formatting.
Ensure you have the following installed:
git clone <repository-url>
cd neetcode-ts
npm install
To run all tests:
npm test
- Implement your solution in the
src
directory, using the problem name as the filename. - Add a corresponding test file in the
tests
directory.
Lint the codebase:
npm run lint
Format the codebase:
npm run format
To run both linting and formatting checks:
npm run check
neetcode-ts/
├── src/
│ └── problems/ # Solution implementations
├── tests/ # Test cases for solutions
├── jest.config.js # Jest configuration
├── package.json # Project metadata and scripts
├── tsconfig.json # TypeScript configuration
├── eslint.config.mjs # ESLint configuration
├── .prettierrc # Prettier configuration
└── .gitignore # Git ignore rules
npm test
- Run all tests.npm run lint
- Run ESLint for code quality checks.npm run format
- Run Prettier to format code.npm run check
- Run lint and format.
This project is licensed under the MIT License.