MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / set

Method set

javascript/0981-time-based-key-value-store.js:19–25  ·  view source on GitHub ↗

* @param {string} key * @param {string} value * @param {number} timestamp * Time O(1) | Space O(1) * @return {void}

(key, value, timestamp)

Source from the content-addressed store, hash-verified

17 * @return {void}
18 */
19 set(key, value, timestamp) {
20 const bucket = this.map[key] || [];
21
22 this.map[key] = bucket;
23
24 bucket.push([value, timestamp]);
25 }
26
27 /**
28 * @param {string} key

Callers 15

getFrequencyMapFunction · 0.45
addRightFrequencyFunction · 0.45
subtractLeftFrequencyFunction · 0.45
checkSubarraySumFunction · 0.45
majorityElementFunction · 0.45
maxPointsFunction · 0.45
getAdjListFunction · 0.45
getValToIndexFunction · 0.45
numberOfGoodPathsFunction · 0.45
minDeletionsFunction · 0.45
wordPatternFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected