随笔分类 -  算法&数据结构

全组合的递归实现(ruby)
摘要:着急用所以直接扒了一个C++算法翻译成了ruby…暂记 阅读全文

posted @ 2016-12-18 21:18 Liz- 阅读(778) 评论(0) 推荐(0)

队列——顺序队列
摘要:原文地址:http://blog.csdn.net/ggxxkkll/article/details/8661569原作者的讲解很详细,看过受益很大。 1 #include "stdafx.h" 2 #include "stdlib.h" 3 #include 4 using namespace... 阅读全文

posted @ 2015-04-29 20:58 Liz- 阅读(232) 评论(0) 推荐(0)

二叉树遍历
摘要:原文地址:http://blog.csdn.net/zhaoxianyong/article/details/7165386 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 struct BiTreeNode 5 { 6 int ... 阅读全文

posted @ 2015-04-29 20:36 Liz- 阅读(210) 评论(0) 推荐(0)

队列——链式队列
摘要:原文地址:http://blog.csdn.net/hguisu/article/details/7674195 1 #include "stdafx.h" 2 #include "stdlib.h" 3 #include 4 #include 5 using namespace st... 阅读全文

posted @ 2015-04-28 20:51 Liz- 阅读(248) 评论(0) 推荐(0)

摘要:原文地址:http://blog.csdn.net/hguisu/article/details/7674195 1 ///栈的顺序存储,c++类实现 2 #include "stdafx.h" 3 #include "stdlib.h" 4 #include 5 using namespace ... 阅读全文

posted @ 2015-04-28 20:48 Liz- 阅读(161) 评论(0) 推荐(0)

单链表
摘要:参考文章:http://blog.csdn.net/hguisu/article/details/7673703 1 #include "stdafx.h" 2 #include "stdlib.h" 3 #include 4 5 #define TRUE 1 6 #define F... 阅读全文

posted @ 2015-04-28 20:42 Liz- 阅读(142) 评论(0) 推荐(0)

《大话数据结构》读书笔记——8.4.1折半查找
摘要://c实现 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 5 int _tmain(int argc, _TCHAR* argv[]) 6 { 7 int a[10] = {0,1,3,4,6,7,9,11,12,15}; 8 ... 阅读全文

posted @ 2015-04-22 21:11 Liz- 阅读(189) 评论(0) 推荐(0)

《大话数据结构》读书笔记——9.9快速排序
摘要:1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 int Partition(int *arr,int _low,int _high); 5 void QSort(int *arr,int low,int high); 6 void QuickSor... 阅读全文

posted @ 2015-04-22 21:06 Liz- 阅读(259) 评论(0) 推荐(0)

《大话数据结构》读书笔记——9.4简单选择排序
摘要://c 实现 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 void swap(int& a,int& b) 5 { 6 int t =a; 7 a = b; 8 b = t; 9 }10 int _tmain(int a... 阅读全文

posted @ 2015-04-15 21:34 Liz- 阅读(211) 评论(0) 推荐(0)

《大话数据结构》读书笔记——9.3冒泡排序
摘要://C 实现 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 void swap(int* a,int* b) 5 { 6 int t =*a; 7 *a = *b; 8 *b = t; 9 }10 int _tmain(in... 阅读全文

posted @ 2015-04-15 21:31 Liz- 阅读(170) 评论(0) 推荐(0)

《大话数据结构》读书笔记——9.5直接插入排序
摘要://C 实现 1 #include "stdafx.h" 2 #include "stdlib.h" 3 4 int _tmain(int argc, _TCHAR* argv[]) 5 { 6 int arr[6] ={0,5,3,4,6,2}; 7 int i,j; 8... 阅读全文

posted @ 2015-04-15 21:27 Liz- 阅读(140) 评论(0) 推荐(0)