Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 1 addition & 1 deletion
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 diff-547edd07d02c2d2d225dd91df1e554a69a05fdae4b091b138d71139be1bcf95d-4-4-0" data-selected="false" role="gridcell" tabindex="-1">
4+
it('Doubly linked list should be class', () => {
55
expect(typeof DLL.prototype.constructor).toEqual('function');
66
});
77

Lines changed: 5 additions & 5 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /