Skip to content

Compilation of interest problems taken from Leetcode 75. This repo includes comments on solutions, tests and debug scripts."

Notifications You must be signed in to change notification settings

andresmunozit/leetcode75-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

47bfb1c · Feb 10, 2025

History

18 Commits
Jan 16, 2024
Dec 26, 2023
Dec 29, 2023
Jan 19, 2024
Jan 23, 2024
Jan 12, 2024
Jan 23, 2024
Dec 26, 2023
Feb 10, 2025
Dec 28, 2023
Dec 26, 2023
Dec 28, 2023
Jan 25, 2024
Dec 28, 2023
Jan 12, 2024
Jan 25, 2024
Feb 4, 2025
Dec 26, 2023
Dec 26, 2023
Jan 18, 2024
Jan 16, 2024
Jan 16, 2024

Repository files navigation

Leetcode 75 Notes

Exercises taken from the Leetcode 75 interview problem compilation. Each exercise folder has the following files:

$ tree ,<exercise-name> 
,<exercise-name>
├── index.js        # Solution implementation
├── package.json    # Contains execution scripts
├── README.md       # Problem description
└── test.js         # Test cases implementation

Usage

To streamline the setup process for each exercise, you can automatically inject the common scripts defined in leetcode-node-scripts.json into the package.json of each exercise directory using the add-scripts.sh bash script.

Injecting Scripts Automatically

  1. Ensure you have a package.json file in your exercise directory (create one with npm init -y if necessary).
  2. Use the add-scripts.sh script to inject the scripts from leetcode-node-scripts.json into your package.json:
# Execute from the repository root
$ ./add-scripts.sh <path-to-exercise>/package.json

After running the script, your package.json will include the following scripts from leetcode-node-scripts.json:

{
  "start": "node index.js",
  "debug": "node --inspect-brk index.js",
  "test": "node test.js"
}

Understanding the Scripts

  • start: Runs the index.js file to start the program. Use this when you want to run you solution.
  • debug: Starts the program in debug mode with --inspect-brk, allowing you to attach a debugger and step through the code.
  • test: Runs the test.js file to execute all test cases associated with the exercise, ensuring your solution meets the specified requirements.

About

Compilation of interest problems taken from Leetcode 75. This repo includes comments on solutions, tests and debug scripts."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published