George

Results 3 comments of George

var LRUCache = function(num) { this.maxNum = num ? num : 2; this.data = new Map(); } LRUCache.prototype.get = function(key) { let value = -1; if (this.data.get(key)) { value =...

var intersection = function() { console.log(arguments); const setList = [...new Set(arguments[0])]; const list = []; setList.forEach(num => { let tag = true; for (let i = 1; i < arguments.length;...