A just-for-fun exercise in implementing the "old standard" Binary Search Tree algorithm in different languages.
BinarySearchTree.mjs contains the class and test.mjs contains the implementation
and tests. You can run it in Node.js:
node test.mjs
To run the Typescript example, make sure you have Typescript installed either globally or locally. To install it globally:
npm install -g typescript
You should also have ts-node installed:
npm install -g ts-node
You can then run the example:
ts-node test.ts
BinarySearchTree.py exports the class and test.py implements the tests.
python test.py