
数据结构算法
紫气东来_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
php-插入排序
php模拟插入排序翻译 2015-02-06 16:32:53 · 357 阅读 · 0 评论 -
十大编程算法助程序员走上高手之路
算法一:快速排序算法快速排序是由东尼霍尔所发展的一种排序算法。在平均状况下,排序个项目要次比较。在最坏状况下则需要次比较,但这种状况并不常见。事实上,快速排序通常明显比其他算法更快,因为它的内部循环可以在大部分的架构上很有效率地被实现出来。快速排序使用分治法策略来把一个串行(list)分为两个子串行(sub-lists)。算法步骤:1 从数列中挑出一个元素,称为转载 2015-02-23 09:16:52 · 519 阅读 · 0 评论 -
php-search_interpolation
$data = array(4,6,7,8,14,55,67,145,218,237,284);$num = interpolationsearch(284);var_dump($num);function interpolationsearch($num){ global $data; $count = count($data); $high = $count-1; $low =翻译 2015-02-06 16:50:52 · 401 阅读 · 0 评论 -
php-struct_searchtree
class node{ public $value; public $left; public $right; public $parent; public function __construct($data){ $this->value = $data; }}class searchtree{ public $root = null; public $size =翻译 2015-02-06 16:48:07 · 398 阅读 · 0 评论 -
php-队列
php模拟队列翻译 2015-02-06 16:43:10 · 396 阅读 · 0 评论 -
php-单链表
php模拟单链表翻译 2015-02-06 16:42:02 · 450 阅读 · 0 评论 -
php-堆栈
php模拟堆栈翻译 2015-02-06 16:40:45 · 522 阅读 · 0 评论 -
php-二叉树
php模拟二叉树翻译 2015-02-06 16:39:36 · 422 阅读 · 0 评论 -
php-冒泡排序
php模拟冒泡排序翻译 2015-02-06 16:37:41 · 359 阅读 · 0 评论 -
php-堆排序
php模拟堆排序翻译 2015-02-06 16:36:32 · 399 阅读 · 0 评论 -
php-快速排序
php模拟快速排序翻译 2015-02-06 16:30:32 · 374 阅读 · 0 评论 -
php-选择排序
php模拟的选择排序翻译 2015-02-06 16:29:30 · 378 阅读 · 0 评论 -
php-约瑟夫环-循环链表
php模拟循环链表解决约瑟夫环问题翻译 2015-02-06 16:57:01 · 694 阅读 · 0 评论 -
php-循环链表
php模拟循环链表翻译 2015-02-06 16:44:59 · 518 阅读 · 0 评论 -
php-二分查找
$data = array(4,6,7,8,14,55,67,145,218,237,284);$num = binarysearch(4);var_dump($num);function binarysearch($num){ global $data; $count = count($data); $high = $count-1; $low = 0; while ($h翻译 2015-02-06 16:49:54 · 379 阅读 · 0 评论