摘要: Each box has acontent area(e.g., text, an image, etc.) and optional surroundingpadding,border, andmarginareas; the size of each area is specified by properties defined below. The following diagram shows how these areas relate and the terminology used to refer to pieces of margin, border, and padding 阅读全文
posted @ 2013-07-05 14:06 Ethan Zheng 阅读(240) 评论(0) 推荐(0) 编辑
摘要: “快速排序是由东尼·霍尔所发展的一种排序算法。在平均状况下,排序 n 个项目要Ο(n log n)次比较。在最坏状况下则需要Ο(n2)次比较,但这种状况并不常见。事实上,快速排序通常明显比其他Ο(n log n) 算法更快,因为它的内部循环(inner loop)可以在大部分的架构上很有效率地被实现出来。”-- 维基百科快速排序主要分为三个步骤从数列中挑选任意一个元素为基准(pivot)元素重新排序数列,把小于基准值的元素摆在基准的左边,将大于基准值的元素摆在基准的右边。这个操作称为分区(partition)操作,分区操作结束后,基准元素所处的位置就是最终排序后它的位置。递归地将小于 阅读全文
posted @ 2013-02-20 15:21 Ethan Zheng 阅读(1338) 评论(0) 推荐(0) 编辑