This is a skeleton project structure which will help you start solving the problem right away.
- Node.js
- Run
npm ci --include=dev
to install the dependencies. - Run
tsc --project tsconfig.json
to compile the typescript code.
-
After building your solution as per How to build your solution you can now run the
main.js
against inputs. -
To run, issue the command
cd dist && node main.js '[...]'
where- [...] is a valid int arr.
Example:
cd dist && node main.js '[1, 2, 3]'
Note: Each full command should be wrapped in single quotes(').
- You can click on the
Run IO
button from the interview application, which will run your solution against some preconfigured inputs and show you the output.