Skip to content

Commit 1478201

Browse files
Replace HashMap dependency with built-in Map
1 parent 4fe5c16 commit 1478201

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

package-lock.json

-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@
2121
"eslint-plugin-import": "^2.14.0",
2222
"jest": "^25.0.0"
2323
},
24-
"dependencies": {
25-
"hashmap": "^2.4.0"
26-
}
24+
"dependencies": {}
2725
}

src/_DataStructures_/Trees/BinaryTree/bottom-view-binary-tree/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const HashMap = require('hashmap');
21
const Queue = require('../../../Queue');
32

43
// Determines the bottom view of a binary tree
@@ -15,7 +14,7 @@ module.exports = function bottomView(binaryTree) {
1514
const horizontalDistance = 0;
1615

1716
// create a map to track most recent visited nodes per hd
18-
const hdToNodeValue = new HashMap();
17+
const hdToNodeValue = new Map();
1918

2019
// perform bfs
2120
const q = new Queue();

0 commit comments

Comments
 (0)