Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
70
var assert = require('assert');
class Hashmap {
constructor() {
// implement this
}
set(key, val) {
// implement this
}
get(key) {
// implement this
}
hashStr(str) {
let finalHash = 0;
for (let i = 0; i < str.length; i++) {
const charCode = str.charCodeAt(i);
finalHash += charCode;
}
return finalHash;
}
}
try {
var dict = new Hashmap();
OUTPUT
Results will appear here.