会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
回看欧洲
沧浪之水清兮,可以濯我缨;沧浪之水浊兮,可以濯我足。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
下一页
2016年5月11日
C/C++学习笔记
摘要: 1、两个自然数的最大公约数: 以小数(除数)除大数(被除数),得余数,如果余数不为0,则小数(除数)作为被除数,余数作为除数,相除后得新余数。若余数为0,则此除数即为最大公约数。否则继续辗转相除。 利用while循环,判断条件是余数是否为0,循环体内将除数做被除数,余数做除数。 另外两个数的:最大公
阅读全文
posted @ 2016-05-11 10:40 回看欧洲
阅读(212)
评论(0)
推荐(0)
2016年4月25日
15、排序:选择类排序和归并排序
摘要: 代码更新自上篇,如下:
阅读全文
posted @ 2016-04-25 18:50 回看欧洲
阅读(348)
评论(0)
推荐(0)
2016年4月22日
14、排序:插入类排序和交换类排序
摘要: 1 package ren.laughing.datastructure.algorithm; 2 /** 3 * 排序 4 * @author Laughing_Lz 5 * @time 2016年4月22日 6 */ 7 public class Sorter { 8 /** 9 * 直接插入排序(从小到大) 时间复杂度为O(n^...
阅读全文
posted @ 2016-04-22 20:47 回看欧洲
阅读(484)
评论(1)
推荐(0)
2016年4月20日
13、自平衡二叉查找树AVL
摘要: 1 package ren.laughing.datastructure.baseImpl; 2 3 /** 4 * 自平衡二叉查找树AVL 继承二叉查找树 5 * 6 * @author Laughing_Lz 7 * @time 2016年4月20日 8 */ 9 public class AVLTree extends BSTree { ...
阅读全文
posted @ 2016-04-20 18:57 回看欧洲
阅读(388)
评论(0)
推荐(1)
2016年4月19日
12、二分查找+二叉搜索树
摘要: 二分查找要求使用顺序数组,此处用例为递增的int数组 关于二叉搜索树,实现功能有:search, min,max,getSuccessor,getPredecessor,insert,remove
阅读全文
posted @ 2016-04-19 21:03 回看欧洲
阅读(242)
评论(0)
推荐(0)
2016年4月14日
11、创建Huffman树,生成Huffman编码
摘要: 1 package ren.laughing.datastructure.baseImpl; 2 3 import ren.laughing.datastructure.base.List; 4 5 /** 6 * 创建Huffman树 7 * 生成Huffman编码 8 * @author Laughing_Lz 9 * @time 2016年4...
阅读全文
posted @ 2016-04-14 17:51 回看欧洲
阅读(353)
评论(0)
推荐(0)
2016年4月13日
10、二叉树的遍历+查找
摘要: 1 package ren.laughing.datastructure.baseImpl; 2 3 import ren.laughing.datastructure.base.Iterator; 4 import ren.laughing.datastructure.base.LinkedList; 5 import ren.laughing.datastructure...
阅读全文
posted @ 2016-04-13 21:03 回看欧洲
阅读(290)
评论(0)
推荐(0)
9、二叉树存储结构结点定义:三叉链表
摘要: 1 package ren.laughing.datastructure.baseImpl; 2 3 import ren.laughing.datastructure.base.Node; 4 /** 5 * 二叉树存储结构结点定义:三叉链表 6 * 三个指针域包含父结点、左孩子、右孩子 7 * @author Laughing_Lz 8 * @tim...
阅读全文
posted @ 2016-04-13 11:44 回看欧洲
阅读(636)
评论(0)
推荐(0)
8、递归的两个案例
摘要: 1 package ren.laughing.datastructure.Instance; 2 /** 3 * 递归案例 4 * @author Laughing_Lz 5 * @time 2016年4月13日 6 */ 7 public class RecuisionInstace { 8 /** 9 * 汉诺塔问题 10 * 结束条件:...
阅读全文
posted @ 2016-04-13 10:14 回看欧洲
阅读(160)
评论(0)
推荐(0)
2016年4月12日
7、栈的三个实例
摘要: 关于迷宫解法的问题,虽然看懂了,但感觉不是最优解。等复习到优先算法时候再来看吧。
阅读全文
posted @ 2016-04-12 16:32 回看欧洲
阅读(263)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
下一页
公告