mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-15 00:18:06 -05:00
16 lines
345 B
TypeScript
16 lines
345 B
TypeScript
//! bench()
|
|
|
|
import BinaryTree from "./helpers/BinaryTree.ts";
|
|
import randish from "./helpers/randish.ts";
|
|
import range from "./helpers/range.ts";
|
|
|
|
export default function main() {
|
|
let tree = new BinaryTree<number>();
|
|
|
|
for (const rand of range(randish()).limit(5_000)) {
|
|
tree.insert(Math.floor(4_000 * rand));
|
|
}
|
|
|
|
return [...tree];
|
|
}
|