This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.isSubsetOf = function(array) { | |
// TODO: Your code here! | |
let stringify = (arr) => { | |
return arr.map(ele => { | |
return JSON.stringify(ele); | |
}); | |
} | |
let thisElement = stringify(this); | |
let arrayElement = stringify(array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
constructor() { | |
this.nodes = {}; | |
} | |
addNode(node) { | |
this.nodes[node] = this.nodes[node] || []; | |
} | |
contains(node) { |