自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 重建二叉树

描述给定一棵二叉树的前序遍历和中序遍历的结果,求其后序遍历。输入输入可能有多组,以EOF结束。每组输入包含两个字符串,分别为树的前序遍历和中序遍历。每个字符串中只包含大写字母且互不重复。输出对于每组输入,用一行来输出它后序遍历结果。#include#include#define MAX 1000typedef struct BiTNode{ cha

2017-05-02 00:05:07 431

原创 快速排序代码

void quickSort(int *s, int left, int right)  {       if(left     {        int i,j,key;        i = left;        j = right;        key = s[i];        while(j > i)        {

2017-04-26 02:06:00 168

原创 461. Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.位运算,需要求两个整数之间的

2017-04-21 01:05:09 160

原创 算法竞赛入门经典 蛇形数组

一、一个比较笨的方法,计算出每次要前进的格数以及每次循环新的开始位置:#include#include#define MAX 10int main (){int a[MAX][MAX];int n,k=0;int i,j=0;scanf("%d",&n);int num = 1;while(1){//downfor(i=j;i{a[i

2017-04-20 01:47:19 340

空空如也

空空如也

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

TA关注的人

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