Clone this repo and install dependencies:
npm install
Inside every data structure folder there is a main.ts
source code. You can:
- Run
ts-node
npx ts-node main.ts
- Or convert Typescript to Javascript and then execute the JS file (vintage tho)
tsc main.ts
node main.js
For tests, just use the implemented methods for each data structure above the implementation. See Linked List source file for an example.