Skip to content

danielcaballero/neetcode-ts

Repository files navigation

Neetcode Solutions in TypeScript

This repository contains solutions to Neetcode problems implemented in TypeScript. The solutions are organized with tests for each problem to ensure correctness and reliability.

Features

  • Structured Codebase: Solutions are placed in the src directory, while tests are in the tests directory.
  • Testing Framework: Uses Jest for testing.
  • Code Quality: Includes ESLint and Prettier configurations to enforce code quality and formatting.

Prerequisites

Ensure you have the following installed:

Getting Started

1. Clone the Repository

git clone <repository-url>
cd neetcode-ts

2. Install Dependencies

npm install

3. Run Tests

To run all tests:

npm test

4. Add a Solution

  1. Implement your solution in the src directory, using the problem name as the filename.
  2. Add a corresponding test file in the tests directory.

5. Lint and Format

Lint the codebase:

npm run lint

Format the codebase:

npm run format

6. Run All Checks

To run both linting and formatting checks:

npm run check

Project Structure

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

Scripts

  • 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.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published