“Seq_D.h”#ifndef__SEQ_LIST_H__#define__SEQ_LIST_H__#defineINIT_SIZE2#defineINC2#include<stdio.h>#include<assert.h>#include<string.h>#include<malloc.h>#include<stdlib.h>typedefintDataType;typedefstructSeqList{ DataType*data;//..
分类:
其他好文 时间:
2016-02-27 01:05:51
阅读次数:
223
1.字典不包含从左到右的顺序 2.If for 表达式:for x in xx:表达式 写为 表达式 for x in xx 3.元组,字符串 不可变性 (1)t.index() t.count() (2)T[0]=1 #change #error (3)不能缩短、增长 无append 4.创建文件
分类:
编程语言 时间:
2016-02-23 00:50:52
阅读次数:
192
顺序表: 声明:struct seqlist { Int last; Int data[12]; }seq,*seqlist; 初始化 seqlist init_seqlist() { seqlist sl = malloc(sizeof(seq)); sl->last =-1;//标记位,用于判断
分类:
其他好文 时间:
2016-02-21 14:22:03
阅读次数:
158
//SeqList.h
#ifndef__SEQLIST_H__
#define__SEQLIST_H__
#include<string.h>
#include<assert.h>
#include<stdlib.h>
typedefintDataType;
typedefstructSeqList
{
DataType*array;
size_tsize;
DataTypecapacity;//容量
}SeqList,*pSeqList;
voidIni..
分类:
其他好文 时间:
2016-02-21 06:45:59
阅读次数:
281
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#include<malloc.h>
typedefintDateType;
typedefstructSeqList
{
DateType*arr;
size_tcapacility;
size_tsize;
}SeqList;
//创建空间
voidCheckCapa(SeqList..
分类:
编程语言 时间:
2016-02-20 01:54:44
阅读次数:
267
#define_CRT_SECURE_NO_WARNINGS1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#defineMAXSIZE1000
typedefintDateType;
typedefstructSeqList
{
DateTypearr[MAXSIZE];
size_tsize;
}SeqList;
//打印静态顺序表..
分类:
编程语言 时间:
2016-02-19 01:47:18
阅读次数:
274
/*练习:实现从键盘输入整数, 顺序表里面,按增长方式进行存储(输入正整数,插入数据,输入负整数,删除数据. 输入3 插入数据3 到顺序表里面;输入-3,把3数据从顺序顺删除)。 数据结构:指数据之间的相互关系包括: 1. 逻辑结构:表示数据运算之间的抽象关系 分:线性结构 和非线性结构 2. 存储
分类:
其他好文 时间:
2016-02-18 21:21:23
阅读次数:
219
#define_CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<assert.h>#include<string.h>#defineMAX_SIZE5typedefintDataType;typedefstructSeqList{DataTypearray[MAX_SIZE];size_tsize;}SeqList;打印顺序表voidPrintfSeqList(SeqList*pSeq){assert(pSeq);i..
分类:
其他好文 时间:
2016-02-18 20:00:52
阅读次数:
186
顺序表是在计算机内存中以数组的形式保存的线性表,是指用一组地址连续的存储单元依次存储数据元素的线性结构。线性表采用顺序存储的方式存储就称之为顺序表。顺序表是将表中的结点依次存放在计算机内存中一组地址连续的存储单元中。顺序表分为静态存储的顺序表和动态存储的顺..
分类:
其他好文 时间:
2016-02-16 01:16:25
阅读次数:
327
以整型数组为例实现逆置将一个整型数组逆序,如:数组a[5]={1,2,3,4,5},逆序之后数组a的内容变成{5,4,3,2,1}。
voidSwapNum(int&a,int&b)
{
a=a^b;
b=a^b;
a=a^b;
}
voidSwapArray(int*str,intsize)
{
inti=0;
for(i=0;i<size/2;i++)
{
SwapNum(str[i],str[size-i-..
分类:
编程语言 时间:
2016-02-15 07:10:20
阅读次数:
204