A repository intended to register my LeetCode challenges developed with Typescript
.
Almost every challenge is presented with some test cases and console logs to visualize them. So to execute the code, you can use ts-node
, tsx
or any Typescript compiler to execute and automatically compile code.
But firstly it's needed a version of Node to be able to install the CLI commands below.
To install and use any of them globally:
Installing tsx:
npm install -g tsx
or...
Installing ts-node:
npm install -g ts-node
To execute any of the code challenges presented in this repository, it's needed to comment all the remaining approach's functions in order to execute the code like below.
With tsx:
tsx ./mediumChallenges/primeSubtractionOperation.ts
With ts-node:
ts-node ./mediumChallenges/primeSubtractionOperation.ts