木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java5年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql5年进入店铺

随笔分类 -  数据结构

摘要:class LinkList{private class Node//创建节点类{public Object item;public Node next;}private Node head;private Node slider;private int count;public LinkList()//构造方法{clear();}public void clear()//清空链表{head = null;slider = null;count = 0;}public boolean isEmpty()//判断链表是否为空{return head==null;}public void goto 阅读全文
posted @ 2012-12-17 15:16 程序流程图 阅读(296) 评论(0) 推荐(0) 编辑
摘要:我们一般只是学过C/C++的数据结构,想必学C#的学生会疑惑,为什么C#没有数据结构呢,那我来告诉你,其实C#也是有数据结构的,只不过我们不了解罢了,经过我半天的编程,终于把C#的数据结构写出来了,也大大增加了我对数据结构的理解,在这里提供出来,共享学习,共同进步!using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 控制台程序{ class CSharp数据结构 { public static void Main(string[] args) { Console. 阅读全文
posted @ 2012-12-16 12:17 程序流程图 阅读(583) 评论(0) 推荐(0) 编辑
摘要:#include #include #include const int ITEMNUM = 100;#define ElemType int//冒泡排序void Bubblesort(ElemType R[],int n,int &comp_num,int &move_num){int i,j,flag=1; //当flag为0,则停止排序ElemType temp;for(i = 0;i temp)&&(i0){comp_num++;for (i=d;i=0&&R[j]>R[j+d]){temp=R[j];R[j]=R[j+d];R[j 阅读全文
posted @ 2012-06-17 14:12 程序流程图 阅读(592) 评论(0) 推荐(0) 编辑
摘要://图 #include #include #define MaxNum 100typedef char Type;//邻接矩阵类型定义typedef struct {Type vexs[MaxNum];int edges[MaxNum][MaxNum];int Vertex_num,edge_num;}MGraph;//邻接表类型定义typedef struct node{int adjvex;struct node *next;}EdgeNode;typedef struct{struct{ Type vertex; EdgeNode * firstedge;}VertexNode[Max 阅读全文
posted @ 2012-06-17 14:09 程序流程图 阅读(318) 评论(0) 推荐(0) 编辑
摘要://链式结构#include #include #include #define MAXSIZE 1000typedef char ElemType;typedef struct LNode{//定义单链表结点类型ElemType data;struct LNode *next;}LinkList;void InitList(LinkList *&L){//带头结点的单链表L = (LinkList *)malloc(sizeof(LinkList));L -> next = NULL;}void DestroyList(LinkList *&L){LinkList *p 阅读全文
posted @ 2012-06-17 14:02 程序流程图 阅读(2539) 评论(0) 推荐(0) 编辑
摘要://对顺序表的操作#include#include #include#define MAXSIZE 1000typedef char ElemType;typedef struct{ElemType data[MAXSIZE];int length;}SqList;//初始化线性表void InitList(SqList*&L){L=(SqList*)malloc(sizeof(SqList));L->length=0;}//销毁线性表void DestoryList(SqList*&L){free(L);}//判断线性表是否为空int ListEmpty(SqList* 阅读全文
posted @ 2012-06-17 13:58 程序流程图 阅读(2656) 评论(0) 推荐(0) 编辑
摘要:#include #include #define MaxSize 100typedef struct node{char data;/*此例中二叉树的结点采用字符类型*/struct node *lchild,*rchild;}NODE;/*按先序遍历序列创建二叉树的二叉链表*/NODE *crt_bt_pre(){NODE *bt;char ch;flushall();scanf("%c",&ch);if(ch == '0')bt = NULL;else{bt = new NODE;bt -> data = ch;printf(" 阅读全文
posted @ 2012-06-17 13:56 程序流程图 阅读(2737) 评论(0) 推荐(0) 编辑

木其网络科技专业程序员代写http://www.xmsydw.com
程序员学历擅长经验网店链接
apenny硕士ASP.NET PHP 电子 通信设计 图像 编程 网络5年进入店铺
zheng_qianqian本科C语言 C++面向对象 Java5年进入店铺
guoguanl本科Java Web项目 JSP Hibernate Struts Mysql5年进入店铺
点击右上角即可分享
微信分享提示