js 定义hash类
摘要:// JavaScript Documentfunction HashTable(){ this._hash={}; this._count=0; /** *添加或者更新key */ this.put=function(key,value){ if(this._hash.hasOwnProperty(key)){ this._hash[key]=value; return true; }else{ this._hash[key]=value; this._count++; return true; } } /** *获取key指定的值 */ this....
阅读全文
posted @
2013-09-15 09:47
叶城宇
阅读(653)
推荐(0)