Skip to content

Commit 980dcf9

Browse files
committed
--fix : fix lowestCommonAncestors import
1 parent 96ba2d3 commit 980dcf9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/_DataStructures_/DoublyLinkedList/doublyLinkedList.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const DLL = require('.');
22

33
describe('Doubly Linked List', () => {
4-
it('Should be class', () => {
4+
it('Doubly linked list should be class', () => {
55
expect(typeof DLL.prototype.constructor).toEqual('function');
66
});
77

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { lca } = require('.');
1+
const { lowestCommonAncestor } = require('.');
22
const BinarySearchTree = require('../index');
33

44
// Quick JSON equivalent
@@ -10,15 +10,15 @@ describe('Lowest Common Ancestor in BST', () => {
1010
keys.forEach(el => bst.add(el));
1111

1212
it('Should return Lowest Common Ancestor Node ', () => {
13-
expect(lca(bst.root, 10, 14).value).toEqual(12);
14-
expect(lca(bst.root, 14, 8).value).toEqual(8);
15-
expect(lca(bst.root, 10, 22).value).toEqual(20);
13+
expect(lowestCommonAncestor(bst.root, 10, 14).value).toEqual(12);
14+
expect(lowestCommonAncestor(bst.root, 14, 8).value).toEqual(8);
15+
expect(lowestCommonAncestor(bst.root, 10, 22).value).toEqual(20);
1616
});
1717

1818
const bst2 = new BinarySearchTree(6);
1919
bst2.remove(6);
2020

2121
it('Should return Null when root is null', () => {
22-
expect(lca(bst2.root, 10, 22)).toEqual(null);
22+
expect(lowestCommonAncestor(bst2.root, 10, 22)).toEqual(null);
2323
});
2424
});

0 commit comments

Comments
 (0)