mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 07:28:03 -05:00
19 lines
329 B
TypeScript
19 lines
329 B
TypeScript
//! test_output([[1,2,5],[1,2,3,4,5]])
|
|
|
|
import BinaryTree from "./helpers/BinaryTree.ts";
|
|
|
|
export default function main() {
|
|
let tree = new BinaryTree<number>();
|
|
|
|
tree.insert(2);
|
|
tree.insert(5);
|
|
tree.insert(1);
|
|
|
|
const treeSnapshot = tree;
|
|
|
|
tree.insert(3);
|
|
tree.insert(4);
|
|
|
|
return [[...treeSnapshot], [...tree]];
|
|
}
|