摘要: function Queue() { var items = []; this.enqueue = function(element) { items.push(element) } this.dequeue = function(element) { return items.shift() ... 阅读全文
posted @ 2016-01-12 22:55 shidengyun 阅读(286) 评论(0) 推荐(0) 编辑
摘要: function PriorityQueue() { var items = []; function QueueElement(element, priority) { this.element = element; this.priotity = priority } this.enqueu... 阅读全文
posted @ 2016-01-12 22:23 shidengyun 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: function Queue() { var items = []; this.enqueue = function(element) { items.push(element) } this.dequeue = function(element) { items.shift() } this.fr... 阅读全文
posted @ 2016-01-12 22:08 shidengyun 阅读(746) 评论(0) 推荐(0) 编辑
摘要: function Stack() { var items = []; this.push = function(item) { items.push(item) } this.pop = function() { return items.pop() } this.peek = function... 阅读全文
posted @ 2016-01-12 21:55 shidengyun 阅读(530) 评论(0) 推荐(0) 编辑
摘要: JS一定要放在Body的最底部么?时间2016-01-12 02:00:02 写代码的小德子 原文 http://delai.me/code/js-and-performance/主题 JavaScript CSS 一、从一个面试题说起面试前端的时候我喜欢问一些看上去是常识的问题。... 阅读全文
posted @ 2016-01-12 09:51 shidengyun 阅读(8676) 评论(4) 推荐(5) 编辑