摘要:
function HashTable() { this.storage = [] this.count = 0 this.limit = 7 // 哈希函数 HashTable.prototype.hashFunc = function (str,size) { var hashCode = ... 阅读全文
摘要:
阅读全文
摘要:
function Set() { // 属性 不用数组 因为数组允许元素重复 集合是不重复的 this.items = {} // 方法 Set.prototype.add = function(value) { if (this.has(value)) { //对象中已经有了该元素 不需要添加了 ... 阅读全文