自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (16)
  • 收藏
  • 关注

原创 单向链表逆转(递归)

struct Node { int value; Node *next; }; //head为原始链表的头节点,p初始值为head,newHead用来存储逆转后的头节点 void reverse(Node *head,Node *p, Node* &newHead) { if (NULL == head) { newHead = NULL;

2012-11-22 22:46:08 671

原创 单向链表逆转(非递归)

#include using namespace std; struct Node { int value; Node *next; }; Node* reverse(Node *head) { Node *p = head; Node *q = NULL; while (NULL != p) { Node *temp = p-

2012-11-21 22:57:18 398

原创 二叉树后序遍历(非递归)

#include #include using namespace std; struct Node { int value; Node *left; Node *right; }; void postorderTraverse(Node *root) { if (NULL == root) { return; }

2012-11-20 20:51:12 362

原创 二叉树后序遍历(递归)

#include using namespace std; struct Node { int value; Node *left; Node *right; }; void postorderTraverse(Node *root) { if (NULL == root) { return; } postorder

2012-11-20 00:55:29 458

原创 二叉树中序遍历(非递归)

#include #include using namespace std; struct Node { int value; Node *left; Node *right; }; void inorderTraverse(Node *root) { if (NULL == root) { return; }

2012-11-20 00:29:55 551

原创 二叉树中序遍历(递归)

#include using namespace std; struct Node { int value; Node *left; Node *right; }; void inorderTraverse(Node *root) { if (NULL == root) { return; } inorder

2012-11-19 22:27:06 592

原创 二叉树先序遍历(非递归)

#include #include using namespace std; struct Node { int value; Node *left; Node *right; }; void preOrderTraverse(Node *root) { if (NULL == root) { return; } stack buf; buf.push(root);

2012-11-15 14:18:35 384

原创 二叉树先序遍历(递归)

#include using namespace std; struct Node { int value; Node *left; Node *right; }; void preorderTraverse(Node *root) { if (NULL == root) { return; } cout v

2012-11-15 00:35:18 413

原创 堆排序

void maxHeapify(int a[], int n, int k) { if (NULL == a) { return; } int left = 2*k + 1; int right = 2*k + 2; int max = k; if (left < n && a[max] < a[left]) { max = left; } if (right < n

2012-11-14 17:56:13 289

原创 单向链表应用

给出一个四则运算表达式,其中每个数字均为小于等于9且大于等于0。不考虑溢出,计算结果。表达式如"1+2*3-6+5-8/2+1+7"。 #include using namespace std; struct Node { int value; Node *next; }; int calculate(char a[]) { if (NULL == a)

2012-11-12 22:46:43 368

原创 全排列打印(二)

给出数字1,2,3。打印出序列:1, 2, 3, 12, 23, 13, 123。 #include using namespace std; bool status[3] = {false, false, false}; void print(int a[], int pos, int n) { if (pos == n) { for (int i

2012-11-09 00:00:53 392

原创 全排列打印(一)

给出数字1,2,3.打印出所有可能的排列。如:123, 132, 213, 231... #include using namespace std; void print(int a[], int begin, int n) { if (begin == n) { for (int i = 0; i < n; i++) {

2012-11-08 22:46:18 385

原创 单向链表归并排序

#include using namespace std; struct Node { int value; Node *next; }; Node* merge(Node *left, int leftLen, Node *right, int rightLen) { if (NULL == left || NULL == right) {

2012-11-08 03:05:31 420

深度探索C++对象模型(清晰版)

向具备多年C++开发经验的行家推荐本书,如果你想深入理解C++底层机制。

2011-04-15

exceptional c++ style中文版 pdf 刘未鹏译

C++大师 Herb Scutter通过40个编程问题,使读者不仅知其然,更要知其所以然,帮助程序设计人员在软件中寻找恰到好处的折中。适合中高级C++程序员阅读。

2010-09-26

PHP技术内幕中文版 pdf--黑皮书系列

全面认识网站编程和PHP。编写WINDOWS和UNIX中可靠而高效的代码。

2010-09-20

设计模式中文版pdf

不错的设计模式教程。讲解清晰,而且很全面。

2010-09-20

数据结构C语言版pdf 清华严蔚敏著

数据结构 c语言版 清华大学 严蔚敏著 大部分高校采用的数据结构教材

2010-09-20

编译原理 陈火旺著

陈火旺主编 编译原理教材 高等学校电子信息类规划教材

2010-09-17

计算机程序的构造和解释原书第2版pdf

每一位严肃的计算机科学家都应该阅读这本书。适合所有希望深刻理解计算机科学的人们。

2010-08-26

C语言深度解剖 解开程序员面试笔试的秘密

一个资深软件工程师的作品,内容讲解较透彻,一定程度弥补了教材中未深入的内容。

2010-08-25

编程珠玑第二版pdf中文

近二十年来众多大师级程序员一致推崇的作品

2010-08-13

UML参考手册pdf中文版

UML参考手册,讲述UML基本概念,为UML的深入理解提供一个起点.

2010-08-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除