随笔分类 -  Data Structure

摘要:Priority Queues9.1 ADT9.2 implementing a priority queue用无序的list来实现用有序的列表来实现优先队列9.3 heapsheap数据结构使用堆来实现优先队列基于数组实现的完全二叉树使用最小优先队列来进行排序adaptable priority ... 阅读全文
posted @ 2015-09-01 19:07 Jolin123 阅读(637) 评论(0) 推荐(0)
摘要:8 Trees8.1 general treestree ADT计算depth和height8.2 二叉树决策树二叉树 ADT8.3 Implementing Trees数组表示得二叉树8.4 树的遍历算法宽度优先遍历中序遍历二叉搜索树python实现树遍历8 Trees8.1 general tr... 阅读全文
posted @ 2015-08-07 15:43 Jolin123 阅读(797) 评论(0) 推荐(0)
摘要:7 Linked Lists7.1 singly linked list7.2 circular linked lists7.4 the positional list ADT7.5 sorting a positional list7.6 链表与数组实现的序列比较7 Linked Lists7.1... 阅读全文
posted @ 2015-07-11 20:52 Jolin123 阅读(1138) 评论(0) 推荐(0)
摘要:5 Array-Based Sequence5.2.1 referential arrays5.2.2 compact arrays in pythonarray.array5.3 dynamic arrays and amortization5.3.1 implementing a dynamic... 阅读全文
posted @ 2015-07-09 10:57 Jolin123 阅读(1520) 评论(1) 推荐(0)
摘要:tail recursion函数在调用的时候,会提前创建一个栈空间,给传递的参数也分配空间,当函数结束返回上层函数的时候,一些局部变量需要从栈中弹出并恢复到调用子函数之前的值,返回到上一个函数调用子函数之前的现场。如果是尾递归,从子函数返回的时候这个函数同时也会结束了,所以没有必要恢复一些局部变量,... 阅读全文
posted @ 2014-09-21 17:59 Jolin123 阅读(328) 评论(0) 推荐(0)