摘要: demo效果展示地址:demo 阅读全文
posted @ 2017-11-22 11:35 柠檬张先生 阅读(594) 评论(0) 推荐(0)
摘要: function Set() { this.dataStore = []; }; Set.prototype = { constructor: Set, add: function (data) { if (this.dataStore.indexOf(data) -1) { this.dataStore.splice(p... 阅读全文
posted @ 2017-11-08 17:53 柠檬张先生 阅读(240) 评论(1) 推荐(0)
摘要: 十一月读书书单: JS权威指南:一年前浮躁得翻过一遍,没怎么沉下心来去钻研探索,有些东西至今掌握还是不牢固,特别正则那块。 JS数据结构与算法(本博客js数据结构和算法分类的学习文章大部分直接来源于该书):这本书一直想拜读,却苦于没有资源,哪位朋友有高清PDF,麻烦留个言感激你不尽啊。 这两本书或许 阅读全文
posted @ 2017-11-08 17:05 柠檬张先生 阅读(147) 评论(0) 推荐(0)
摘要: function HashTable() { this.table = new Array(137); }; HashTable.prototype = { constructor: HashTable, simpleHash: function(data) { var total = 0; for (var i = 0; i -1) {... 阅读全文
posted @ 2017-11-08 16:41 柠檬张先生 阅读(250) 评论(0) 推荐(0)
摘要: function Dictionary() { this.datastore = new Array(); }; Dictionary.prototype = { constructor: Dictionary, add: function(key, value) { this.datastore[key] = value; }, find... 阅读全文
posted @ 2017-11-08 11:28 柠檬张先生 阅读(199) 评论(4) 推荐(0)
摘要: /* * 单向链表 * Node 类用来表示节点 * LinkedList 类提供了插入节点、删除节点、显示列表元素的方法,以及其他一些辅助方法。 */ function Node(element) { this.element = element; this.next = null; }; function LList() { this.head =... 阅读全文
posted @ 2017-11-07 15:56 柠檬张先生 阅读(502) 评论(0) 推荐(0)
摘要: function Queue() { this.dataStore = []; } Queue.prototype = { constrcutor: Queue, enqueue: function(element) { this.dataStore.push(element); }, dequeue: function() { ... 阅读全文
posted @ 2017-11-07 11:11 柠檬张先生 阅读(281) 评论(1) 推荐(0)
摘要: function Stack() { this.dataStore = []; //存储栈元素 } Stack.prototype = { constructor: Stack, push: function(element) { this.dataStore.push(element) }, pop: function() { ... 阅读全文
posted @ 2017-11-07 08:40 柠檬张先生 阅读(471) 评论(1) 推荐(0)
摘要: function List(arr) { this.listSize = arr.length; //列表元素个数 this.pos = 0; //列表当前位置 this.dataStore = arr; //初始化一个空数组来保存列表元素 } List.prototype = { constructor: Lis... 阅读全文
posted @ 2017-11-06 09:49 柠檬张先生 阅读(319) 评论(0) 推荐(1)
摘要: 这篇博客是第一篇博客园的博客,写的有点晚了。 想对博客园说声,对不起,我来晚了。 之前在CSDN写过几篇,那已经是时隔半年之前的事情了。昨天一时心血来潮,老夫聊发少年狂得打开了CSDN,却发现现在的CSDN已经不是以前的CSDN了。 商业广告满天飞,屡屡有小弹窗犯境,不堪其扰。不禁思考着CSDN从技 阅读全文
posted @ 2017-11-03 08:50 柠檬张先生 阅读(195) 评论(0) 推荐(1)