
数据结构
ilikeprograming
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[数据结构]头插法与尾插法
#include "stdio.h"#include "stdlib.h"typedef struct List { int data; //数据域 struct List *next; //指针域} List;void TailCreatList(List *L) //尾插法建立链表{ List *s, *r;//s用来指向新生成的节点。r始终指向L的终端节点。 r = L;转载 2013-09-29 10:56:32 · 15823 阅读 · 0 评论 -
链式二查树遍历代码
#include "stdio.h"#include"malloc.h"//二叉树节点typedef struct BiTNode { char data; struct BiTNode *lchild, *rchild;//这里的*BiTree其实不一定要定义//定义BiTNode就够了//在代码中表示树可以这么写:BiTNode *t;} BiTNode, *BiTree;转载 2013-11-02 02:07:58 · 573 阅读 · 0 评论 -
[数据结构]程杰 线索二叉树代码
算法演示可以参见这里:http://sjjg.js.zwu.edu.cn/SFXX/sf1/zxxsh.html#include "string.h"#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"/*线索二叉树----Threaded Binary Tree * 二叉树线索化的目的是更好转载 2013-11-03 08:15:40 · 666 阅读 · 0 评论 -
[数据结构]程杰—— 二叉排序树_BinarySortTree
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 100 /* 存储空间初始分配量 */typedef int Status; /* Stat转载 2013-11-07 01:26:29 · 638 阅读 · 0 评论 -
[数据结构]程杰——静态查找_Search
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 100 /* 存储空间初始分配量 */typedef int Status; /* Stat转载 2013-11-07 00:33:44 · 563 阅读 · 0 评论 -
[数据结构]程杰:散列表(哈希表)
#include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 100 /* 存储空间初始分配量 */转载 2013-11-08 23:26:59 · 712 阅读 · 0 评论 -
有一个带头结点的单链表L={a1,b1,a2,b2,...,an,bn},设计一个算法将其拆分成两个带头结点的单链表A和B,正序链表A={a1,a2,a3...,an},逆序链表B={bn,bn-1,
有一个带头结点的单链表L={a1,b1,a2,b2,...,an,bn},设计一个算法将其拆分成两个带头结点的单链表A和B,正序链表A={a1,a2,a3...,an},逆序链表B={bn,bn-1,,...b1}.要求链表A使用链表L的头结点。#include "stdio.h"#include "stdlib.h"//节点typedef struct List { i原创 2013-12-30 02:26:38 · 19347 阅读 · 2 评论 -
Java 哈希表例子
import java.util.*;/** * * Title: 哈希表操作 * * * Description: 这是一个权限认证的例子,使用了哈希表作为数据的存储 * * * Copyright: Copyright (c) 2003 * * * Filename: RoleRight.java * * * @author 杜江 * @ve转载 2013-11-03 09:13:09 · 3845 阅读 · 0 评论 -
[数据结构]从中序表达式到逆序表达式(逆波兰式)(四则运算表达式求值)
#include#include#define max 100char ex[max]; /*存储后序表达式*//*函数功能:将中序表达式转化为后序表达式*/void trans() { char str[max]; /*表达式字符串*/ char stack[max]; /*运算符栈*/ char ch; /*当前字符*/ int sum,转载 2013-10-06 21:42:53 · 5121 阅读 · 2 评论 -
由先序遍历和中序遍历构造二叉树的二叉链表代码
转载自:http://blog.youkuaiyun.com/sunmeng_007/article/details/8095224#include//定义节点typedef struct btnode{ char value; struct btnode *left; struct btnode *right;}btnode;//该函数的作用是:返回在中序遍历序列数组中转载 2013-12-28 11:31:27 · 4387 阅读 · 1 评论 -
[数据结构]程杰 二叉树顺序结构实现_BiTreeArray
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 100 /* 存储空间初始分配量 */#define MAX_TREE_SIZE 100 /转载 2013-10-25 13:19:03 · 637 阅读 · 0 评论 -
[数据结构]程杰模式串匹配、KMP算法及其改进(代码)
#include "string.h"#include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 1转载 2013-10-22 08:37:11 · 1092 阅读 · 0 评论 -
[数据结构]程杰《大话数据结构》单链表代码
#include "stdio.h"#include "string.h"#include "ctype.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /*转载 2013-10-01 23:56:03 · 2738 阅读 · 0 评论 -
[数据结构]程杰《大话数据结构》静态链表代码(
#include "string.h"#include "ctype.h"#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 1000 /* 存储转载 2013-10-03 23:35:05 · 2641 阅读 · 0 评论 -
用函数指针代替C++的引用参数 //严蔚敏《数据结构》(C语言版)课本源代码
/* f.c 用函数指针代替C++的引用参数 */ #include void fa(int a) /* 在函数中改变a,将不会带回主调函数(主调函数中的a仍是原值) */ { a=5; printf("在函数fa中:a=%d\n",a); } void fb(int *a) /* a为指针类型,在函数中改变*a,改变后的值将带回主调函数 */ { *a=5;转载 2013-10-03 22:44:10 · 2097 阅读 · 0 评论 -
[数据结构]程杰《大话数据结构》书中的顺序栈源码(
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存储空间初始分配量 */typedef int Status;typedef i转载 2013-10-04 12:46:28 · 976 阅读 · 0 评论 -
[数据结构]程杰《大话数据结构》链栈代码
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存储空间初始分配量 */typedef int Status;typedef in转载 2013-10-04 19:22:57 · 695 阅读 · 2 评论 -
[数据结构]程杰《大话数据结构》书中的顺序表源码
#include#include#include#include#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 //存储空间初始分配量typedef int Status; //函数的类型typedef int ElemType;//顺序表中元素的类型typedef s转载 2013-09-29 10:09:45 · 1771 阅读 · 0 评论 -
[数据结构]程杰《大话数据结构》循环链表代码
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存储空间初始分配量 */typedef int Status;typede转载 2013-10-14 10:42:00 · 894 阅读 · 0 评论 -
[数据结构]程杰队列的链式存储结构及实现代码
#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存储空间初始分配量 */typedef int Status;ty转载 2013-10-14 20:00:23 · 1051 阅读 · 0 评论 -
[数据结构]程杰字符串的基本操作代码
#include "string.h"#include "stdio.h"#include "stdlib.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 40 /* 存储空间初始分配量 */typedef转载 2013-10-19 08:35:50 · 1441 阅读 · 1 评论 -
顺序栈-代码
《数据结构与算法的问题与实验》例子原创 2014-11-14 10:15:22 · 664 阅读 · 0 评论