上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: 题目描述Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for ... 阅读全文
posted @ 2017-06-22 17:18 云胡同学 阅读(83) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include#include#include#define maxstudent 40//最大的学生数40typedef struct student{ int num; int classid; int y... 阅读全文
posted @ 2017-06-20 21:56 云胡同学 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int main(){ double a[100], sum = 0, expect = 0, variance = 0; int n; scanf("%d",&n); f... 阅读全文
posted @ 2017-06-13 20:05 云胡同学 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int max(int a, int b){ if(a > b) return a; else return b;}int main(){ int t, n, v,k... 阅读全文
posted @ 2017-06-02 02:16 云胡同学 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 题目描述Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negative intege... 阅读全文
posted @ 2017-05-26 23:33 云胡同学 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; typedef struct node { struct node *lchild; struct node *rchild; char data; }BiTreeNod... 阅读全文
posted @ 2017-05-25 21:12 云胡同学 阅读(82) 评论(0) 推荐(0) 编辑
摘要: #include #include #define max 50typedef struct liuyu{ int data; struct liuyu *lchild,*rchild;}test;liuyu *root,*p,*q[max];int su... 阅读全文
posted @ 2017-05-25 20:08 云胡同学 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; void MinHeapFixdown(int a[], int i, int n)//调整堆 { int j, temp; temp = a[i]; j = 2 * i + 1;//i节点的左孩子节点 while (j = temp) //最小的孩子节点大于... 阅读全文
posted @ 2017-05-11 23:02 云胡同学 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 首先输入一个待匹配的括号序列,如果是左括号将其压入栈中,如果是右括号则与当前栈顶的括号相匹配(左中括号匹配右中括号,左小括号匹配右小括号)。若匹配失败,输出匹配失败,程序结束,若匹配成功,将栈顶括号出栈,直到最后一个括号匹配完成。若最后栈为空输出匹配成功,不为空输出匹... 阅读全文
posted @ 2017-05-04 21:54 云胡同学 阅读(326) 评论(0) 推荐(0) 编辑
摘要: #include#include"stdlib.h"using namespace std;typedef struct node //定义结点{ int data; //结点的数据域为整型 struct node... 阅读全文
posted @ 2017-04-17 16:51 云胡同学 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页