
Data Structure
Yunhe_Feng
这个作者很懒,什么都没留下…
展开
-
stack vs heap
This linked article introduces the concept of stack and heap as well as their difference. http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html Stack: Access fast Allocate and releas转载 2015-04-25 01:48:32 · 667 阅读 · 0 评论 -
调试dijkstra代码遇到的问题(总结)
对于map数据结构掌握不熟悉,导致了使用insert()来更新map中的数值。在调试过程中,花了很多时间查找错误。对于case of tie情况没有提前预测到,导致花费了很长时间改此错。c++ 的list数据结构在声明的时候,不需要大写首字母List,正确的应该是list。原创 2015-01-28 00:06:00 · 868 阅读 · 0 评论 -
B树的理解
B树的定义 Definition[edit] According to Knuth's definition, a B-tree of order m is a tree which satisfies the following properties: Every node has at most m children.Every non-leaf node (exce原创 2014-10-09 23:52:40 · 1534 阅读 · 0 评论 -
为何需要字节对齐
字节对齐是计算机科学中的一个基本的概念。之前我一直没有搞清楚为什么需要进行字节对齐。今天读了几篇相关文章后,明白了其原因。字节对齐与CPU访问Memory的方式和效率直接相关。CPU读取Memory或者向Memory写入数据时,是以字节块为单位进行操作的,(比如在32位系统中,一般来讲是以4字节为单位)。编程时遵守字节对齐原则能够加速CPU对Memory的访存。如果不遵守字节对齐原则不但增加CPU原创 2014-10-09 05:00:01 · 1123 阅读 · 0 评论