// æµè¯åå¸ç®æ³ var hashFunc = require('./HashFunc'); console.log(hashFunc('abc', 7)); // 4 console.log(hashFunc('cde', 7)); // 4 åç碰æ console.log(hashFunc('bda', 7)); console.log(hashFunc('abc', 7)); console.log(hashFunc('bda', 7)); // æµè¯åå¸è¡¨ var HashTable = require('./HashTable'); var ht = new HashTable(); // æå ¥æ°æ® ht.put("abc", "1"); ht.put("cba", "2"); ht.put("nba", "3"); ht.put("mba", "4"); ht.put("dba", "5"); // è·åæ°æ® console.log(ht.get("abc")); // 1 ht.put("abc", "2"); console.log(ht.get("abc")); // 2 // å 餿°æ® console.log(ht.remove("abc")); // 2 console.log(ht.get("abc")); // null console.log(ht.storage);