自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

我的新博客

心得及感受

  • 博客(17)
  • 资源 (9)
  • 问答 (4)
  • 收藏
  • 关注

原创 面试题50:二叉树中两个节点的最低公共祖先

#include #include #include using namespace std;typedef struct BtNode{ int value; struct BtNode *lchild; struct BtNode *rchild;}BtNode, *Bitree;Bitree newBtNode(){ Bitree p = new BtNode

2016-05-31 20:24:29 1075

原创 得到二叉树中从根节点到树中某一节点的路径

#include #include #include using namespace std;typedef struct BtNode{ int value; struct BtNode *lchild; struct BtNode *rchild;}BtNode, *Bitree;Bitree newBtNode(){ Bitree p = new BtNode

2016-05-31 20:19:46 6565

原创 归并排序

#include using namespace std;int combineSort( int a[], int low, int high ){ int ret = 0; if( NULL == a || low > high ) { cout high" << endl; ret = -1; return ret; } if( low == high

2016-05-31 09:08:53 383

原创 面试题47:不用加减乘除做加法

#include using namespace std;int Add( int num1, int num2 ){ int sum = 0; int carry = 0; do { sum = num1 ^ num2; carry = ( num1 & num2 ) << 1; num1 = sum; num2 = carry; }while( num2

2016-05-30 19:58:22 484

原创 面试题32:从1到n整数中1出现的次数

#include #include #include using namespace std;// 参考《剑指offer 面试题32:从1到n整数中1出现的次数 P174》 int powerOfn( int n ) { int result = 1; int cnt = 1; while( cnt <= n ) { result *= 10; cnt+

2016-05-29 11:45:56 397

原创 面试题31:连续子数组的最大和

#include using namespace std;long long getMaxSum( int a[], int low, int high ){ long long max = -INT_MAX - 1; long long sum = 0; if( NULL == a || low > high ) { cout high" << endl; m

2016-05-29 11:42:13 419

原创 multiset的插入与删除

#include #include#include #include#include using namespace std;int main (){ typedef multiset > IntSet; IntSet myset; int myints[] = {75,23,65,42,23}; for( int i = 0; i < 5; i++ )

2016-05-28 21:34:55 6322

原创 面试题29:找出数组中出现次数超过一半的数字-基于partition函数以及分摊法

#include using namespace std; int partition( int a[], int low, int high ){ if( low >= high ) { return low; } int index = low - 1; for( int i = low, j = high; i < j; ++i ) { if( a[i

2016-05-28 20:43:33 653

原创 面试题27:二叉搜索树按中序遍历原地转换为双向链表

#include #include #include #include using namespace std;typedef struct BtNode{ char data; struct BtNode *lchild; struct BtNode *rchild;}BtNode, *Bitree;typedef struct Node{ Bitree p

2016-05-27 18:22:27 1769

原创 字符串的全排列

#include #include #include #include #include #include #include #include #include #include using namespace std;// 打印pSrc的所有排列,pSrc中字符各不相同void printAllSeq( int curLength, const char *pSrc,

2016-05-27 15:44:28 520

原创 面试题25:二叉树中和为某一个值的路径

#include #include #include #include #include #include #include #include #include #include using namespace std;typedef struct Node{ int data; struct Node *lchild; struct Node *rchild;

2016-05-27 13:53:55 401

原创 面试题21:包含min函数的栈,面试题22:判断某一序列是否是出栈序列

#include #include #include #include #include #include #include #include #include #include using namespace std;// 判断pOut是否是pIn的出栈序列bool isOutStackSeq( const char *pIn, const char *pOut )

2016-05-27 10:34:02 421

原创 n个元素进栈,输出所有出栈序列-卡特兰数-递归

#include #include #include #include #include #include #include #include #include #include using namespace std;void printAllOutStackSeq( queue inQueue, int n, stack st, queue out ){ if(

2016-05-26 17:46:03 8865

原创 大数乘法、大数加法实现

#include #include #include #include #include #include #include #include using namespace std;// 实现两个数的加法// 判断一个字符串是否为有效的数bool isValidNumber( const string &s ){ bool ret = true; int len

2016-05-26 14:22:04 695

原创 面试题12:打印1到最大的n位数-大数问题-递归实现多层循环

#include #include #include #include #include #include #include using namespace std;void printToMaxNdigits( int n ){ if( n < 1 ) { cout << "printToMaxNdigits func: err -1, n < 1 " << en

2016-05-26 08:47:39 886

原创 快速排序、求旋转数组最小数字

#include #include #include #include using namespace std;// 快速排序1void quickSort( int a[], int l, int r ){ if( l >= r ) { return; } int i = l; int j = r; int mid = ( l + r ) / 2; i

2016-05-25 16:46:00 442

转载 二叉树非递归遍历、层次遍历、高度、节点数

// 参考大神所写 http://blog.csdn.net/hackbuteer1/article/details/6583988#include #include #include #include using namespace std;typedef struct BtNode{ char data; struct BtNode *lchild; struct

2016-05-24 20:32:06 2659

python基础教材源码

python基础教材源码,其他地方下载来的

2015-03-16

opengl的sdk库文件

OpenGL开发必备sdk,可以用,现在貌似Nehe中文教程sdk无法下载,所以网上搜集了sdk

2014-10-13

opengl sdk

opengl sdk

2014-10-02

gcc离线安装包(我已安装成功了)

gcc离线安装包,在不能上网的情况下安装gcc

2014-09-10

像360界面的互粉软件VC源码

VC实现一个360界面,VC做个好界面是不错的选择。

2014-05-25

编译原理 求Firs,tFollow集合

cpp实现求编译原理的First和follow集合。

2014-05-25

Hadoop的Eclipse插件,MapReduce

插件: hadoop-0.20.1-eclipse-plugin,hadoop-eclipse-plugin-1.0.0这两个插件,需要的可以下载。

2014-04-08

广工图形学试卷,计算机图形学

这是广东工业大学的图形学试卷,考试试卷,需要的可以下载看看。

2014-04-08

华科考研历年机试C语言实现_无题目只有代码实现_不完整

华科考研历年机试C语言实现,用C语言实现历年华科部分机试题目,资源中只有C语言实现,不包含对应的题目描述(这是本人自己写的代码,可能会有bug,但应该能通过机试)。

2014-03-26

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

TA关注的人

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