2014-01-12 W.Y.
算法原理 快速排序是图灵奖得主 C. R. A. Hoare 于 1960 年提出的一种划分交换排序。它采用了一种分治的策略,通常称其为分治法(Divide-and-ConquerMethod)。 分治法的基本思想是:将原问题分解为若干个规模更小但结构与原问题相似的子问题。递归地解这些子问题,然后将这些子问题的解组合为原问题的解。 利用分治法可将快速排序的分为三步: 在数据集之中,选择一个元素作为"基准"(pivot)。 所有小于"基准"的元素,都移到"基准"的左边;所有大于"基准"的元素,都移到"基准"的右边。这个操作称为分区 (partition) 操作,分区操作结束后,基准元素所处的位置就是最终排序后它的位置。 对 继续阅读 »
2016-01-07 Klaus Ma
Introduction The purpose of this document is to give an introduction and overall description of the contribution process for contributors new to Mesos. This document is intended to extend the existing documentation with a focus on on-boarding contributors to the community as quickly as possible. 继续阅读 »
2000-02-22 ruki
content {:toc} Note: This documents is only a mirror, if you want to see newest documents please goto: http://xmake.io/#/home/ xmake 继续阅读 »
2017-10-14 Lingxian Kong
前面一篇博客讲了如何在 devstack 环境中配置 Qinling 与其他 OpenStack 服务交互,为了方便演示,我录制了一个短视频,对 Qinling 有兴趣的同学们可以通过视频对 Qinling 有个大致了解。 继续阅读 »
2016-06-23 jude
《编程珠玑》第 32 页,提到:“尽管第一个二分查找程序于1946年就已经公布了,但是第一个没有 bug 的二分查找程序在 1962 年才出现。”还说参加课堂测试的专业程序员中, 90% 写的二分查找程序都有 bug 。 真的有那么难吗?我心血来潮,动手写起了快排(不要问为什么不是二分查找)。隐约记得快排的原理如下: 继续阅读 »
2016-10-16 Meng Lei
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick Start Create a new post bash $ hexo new "My New Post" More info: Writing Run server bash $ hexo server More in 继续阅读 »
2015-06-20 王财勇
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick Start Create a new post bash $ hexo new "My New Post" More info: Writing Run server bash $ hexo server More in 继续阅读 »
2016-09-03 craneyuan
定义 快速排序(英语:Quick Sort),又称划分交换排序(partition-exchange sort),一种排序算法,最早由东尼·霍尔提出。在平均状况下,排序n个项目要Ο(n log n)次比较。在最坏状况下则需要Ο(n2)次比较,但这种状况并不常见。事实上,快速排序通常明显比其他Ο(n log n)算法更快,因为它的内部循环(inner loop)可以在大部分的架构上很有效率地被实现出来。 more 算法步骤 快速排序使用分治法(Divide and conquer)策略来把一个序列(list)分为两个子序列(sub-lists)。 步骤为: 从数列中挑出一个元素,称为"基准"(pivot), 重新排序数列 继续阅读 »
2013-05-05 Robert Zhang
分析:注意到“the quick brown fox jumps over the lazy dog”包含了全部26个英文字母,所以只要找到一句相匹配的密文,就可以解密全部了。more ```cpp include include include include include 继续阅读 »
2017-06-04 AnnatarHe
最近迁移项目,顺便一些东西也都相应升级一下。中间碰到了一些问题,记录一下。 http/2 所有的 request, response 都转成小写了,和 HTTP/1.1可不一样。详情可以看这里 HTTP/2 finalized - a quick overview 继续阅读 »