| 3 | // Time O(n) | Space O(n) where is the number of nodes |
| 4 | |
| 5 | class BinaryTree { |
| 6 | constructor(value) { |
| 7 | this.value = value; |
| 8 | this.parent = null; |
| 9 | this.right = null; |
| 10 | this.left = null; |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | |
| 15 | const root = new BinaryTree(1); |
nothing calls this directly
no outgoing calls
no test coverage detected