摘要: function BinarySearchTree() { var Node = function(key) { this.key = key; this.left = null; this.right = null; } var root = null; var insertNode = f... 阅读全文
posted @ 2016-01-13 14:09 shidengyun 阅读(193) 评论(0) 推荐(0) 编辑
摘要: function ArrayList() { var array = []; this.swap = function(index1, index2) { var aux = array[index1]; array[index1] = array[index2]; array[index2]... 阅读全文
posted @ 2016-01-13 08:25 shidengyun 阅读(187) 评论(0) 推荐(0) 编辑
摘要: function DoublyLinkedList() { var Node = function(element) { this.element = element; this.next = null; this.prev = null } var length = 0; var head ... 阅读全文
posted @ 2016-01-13 07:26 shidengyun 阅读(194) 评论(0) 推荐(0) 编辑
摘要: function LinkedList() { var Node = function(element) { this.element = element; this.next = null } var length = 0; var head = null; this.append = fun... 阅读全文
posted @ 2016-01-13 06:37 shidengyun 阅读(317) 评论(0) 推荐(0) 编辑