上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 59 下一页
摘要: 链表逆序 1 #include<iostream> 2 #include<stdio.h> 3 #include<algorithm> 4 using namespace std; 5 #define MAXSIZE 1000010 6 7 struct node { 8 int data; 9 i 阅读全文
posted @ 2019-05-03 21:05 cxc1357 阅读(172) 评论(0) 推荐(0)
摘要: 线性表 定义:同一类型的数据元素构成的有序序列的线性结构 数组实现 1 #include<stdio.h> 2 #include<stdlib.h> 3 #define MAXSIZE 80 4 typedef int ElementType; 5 6 typedef struct LNode { 阅读全文
posted @ 2019-05-03 18:09 cxc1357 阅读(127) 评论(0) 推荐(0)
摘要: 链表的实现 一、静态链表 1 #include<stdio.h> 2 struct node{ 3 int data; 4 struct node *next; 5 }; 6 typedef struct node NODETYPE; 7 8 int main(){ 9 NODETYPE a,b,c 阅读全文
posted @ 2019-05-03 00:22 cxc1357 阅读(231) 评论(0) 推荐(0)
摘要: 用栈实现树遍历 1 #include<stdio.h> 2 #include<string.h> 3 #define MAXSIZE 30 4 5 int Pre[MAXSIZE],In[MAXSIZE],Post[MAXSIZE]; 6 void solve(int preL,int inL,in 阅读全文
posted @ 2019-05-01 18:00 cxc1357 阅读(157) 评论(0) 推荐(0)
摘要: 程序: 1 #include<stdio.h> 2 #include<string.h> 3 #define N 81 4 5 int main() { 6 char ch[N],temp[N]; 7 int i,cnt,lng=0; 8 scanf("%d",&cnt); 9 gets(ch); 阅读全文
posted @ 2019-04-30 16:59 cxc1357 阅读(1194) 评论(0) 推荐(0)
摘要: 程序: 1 #include<stdio.h> 2 #include<string.h> 3 #define N 85 4 5 int main() { 6 int t,i,j,m=0,flag; 7 char original[N],target[N]; 8 gets(original); 9 f 阅读全文
posted @ 2019-04-30 16:38 cxc1357 阅读(1725) 评论(0) 推荐(0)
摘要: PTA 1 #include<stdio.h> 2 int main() { 3 int year,month,day,cnt,flag; 4 flag = 0; 5 scanf("%4d/%2d/%2d",&year,&month,&day); 6 if((year%4 ==0 && year%1 阅读全文
posted @ 2019-04-28 23:33 cxc1357 阅读(301) 评论(0) 推荐(0)
摘要: 一、人的行动的基本原理 基本概念: 什么是人的行动?人的有意图行为(purposeful behabior) 人的行动有何特点?只有个体,即“行动人”才能实施行动,群体、国家、社会不会独立存在,即没有“群体的”、“国家的”、“集体的”行动这回事 人何时会发起行动(人的行动之前提)?需满足两个要素:行 阅读全文
posted @ 2019-04-28 23:26 cxc1357 阅读(796) 评论(0) 推荐(0)
摘要: 一、基本概念 什么是线性结构和非线性结构,举例?线性结构是一个有序数据元素的集合,元素之间一对一关系,即除了第一个和最后一个元素外,其他元素首尾相接,如线性表、栈、队列、数组;非线性结构每个元素可能与零或多个其他元素发生关系,如二维数组、树、图等 数据存储结构分类?顺序(随机存取)、链式(顺序存取) 阅读全文
posted @ 2019-04-27 12:14 cxc1357 阅读(193) 评论(0) 推荐(0)
摘要: 1、交换排序 a、冒泡排序 1 #include <stdio.h> 2 int main() { 3 int a[] = {4, 0 , 2, 3, 1}, i, j, t; 4 for(i=4; i>=0; i--) { 5 for(j=0; j<i; j++) { 6 if(a[j]>a[j+ 阅读全文
posted @ 2019-04-27 09:17 cxc1357 阅读(217) 评论(0) 推荐(0)
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 59 下一页