Skip to content

Commit fd577ca

Browse files
Update DiameterOfBinaryTree.test.js
1 parent a9948f4 commit fd577ca

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Trees/test/DiameterOfBinaryTree.test.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
import { diameterOfBinaryTree } from './diameterOfBinaryTree';
2-
import { TreeNode } from '../utils/TreeNode';
1+
/**
2+
* 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+
314

415
describe('Diameter of a Binary Tree', () => {
516
it('should calculate the correct diameter for a standard tree', () => {

0 commit comments

Comments
 (0)