We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9948f4 commit fd577caCopy full SHA for fd577ca
Trees/test/DiameterOfBinaryTree.test.js
@@ -1,5 +1,16 @@
1
-import { diameterOfBinaryTree } from './diameterOfBinaryTree';
2
-import { TreeNode } from '../utils/TreeNode';
+/**
+ * A node for a binary tree.
3
+ */
4
+class TreeNode {
5
+ constructor(value) {
6
+ this.value = value;
7
+ this.left = null;
8
+ this.right = null;
9
+ }
10
+}
11
+
12
+import { diameterOfBinaryTree } from './DiameterOfBinaryTree';
13
14
15
describe('Diameter of a Binary Tree', () => {
16
it('should calculate the correct diameter for a standard tree', () => {
0 commit comments