- 博客(11)
- 资源 (5)
- 收藏
- 关注
原创 完整的农夫过河问题
Client类package four2;import java.util.Scanner;@SuppressWarnings(“all”)public class Client {public static void menu(){ System.out.println("\t============Please choose operation================"); System.out.println("\t==========1:Cross the river alo
2020-06-08 20:48:58 315
原创 带头结点的尾接法
#include <stdio.h>#include <stdlib.h>typedef int ElementType;typedef struct Node *PtrToNode;struct Node {ElementType Data;PtrToNode Next;};typedef PtrToNode List;List Read();void Print( List L );List Insert( List L, ElementType X );
2020-06-07 19:51:45 253
原创 带头结点的前插法
#include <stdio.h>#include <stdlib.h>typedef int ElementType;typedef struct Node *PtrToNode;struct Node {ElementType Data;PtrToNode Next;};typedef PtrToNode List;List Read();void Print( List L );//List Insert( List L, ElementType X
2020-06-07 19:50:48 377
原创 链表的非递减删重
#include <stdio.h>#include <stdlib.h>typedef int ElementType;typedef struct Node *PtrToNode;struct Node {ElementType Data;PtrToNode Next;};typedef PtrToNode List;List Read();void Print( List L );List Insert( List L);int main(){Li
2020-06-07 19:49:36 142
原创 先中后序建树
#include<stdio.h>#include<malloc.h>#define MAX_TREE_SIZE 100typedef struct {int i;}TElemType;typedef struct BiTNode{char data;struct BiTNode *lchild,rchild;}BiTNode,BiTree;int CreateBiTree(BiTree &T){char ch;scanf("%c",&ch
2020-06-07 19:48:30 185 1
原创 八大排序算法,1:冒泡排序 2:插入排序 3:希尔排序 4:快速排序 5:堆排序 6:归并排序 7:基数排序 8:选择排序
我这只有干货#include<stdio.h>#include<stdlib.h>#include<string.h>#define OK 1typedef int Status;struct str{int data;struct str *next;}List[10];Status *ChaRu(int ss[],int len){//插入排序int i,j,k;int t = 0;for(i=1;i<=len;i++){ j
2020-06-07 19:47:18 361
原创 迷宫
#include<stdio.h>#define MaxSize 100#define M 8#define N 8typedef struct{ int i,j; //方块在迷宫中的坐标位置(i,j)int pre; //本路径中上一方块在队列中的下标 } SqQueue;SqQueue Qu[MaxSize]; //定义顺序非循环队列int front=0,rear=0;int mg[M+2][N+2]={{1,1,1,1,1,1,1,1,1,
2020-06-07 19:45:25 183
原创 计算表达式
#include<stdio.h>#include<stdlib.h>#include <process.h>#define ok 1#define ERROR 0#define OVERFLOW -1#define INITSIZE 100//预定义容量大小#define INCREMENT 10 //增加的容量typedef int Status;typedef char SElemType;typedef struct{SElemType *b
2020-06-07 19:44:49 187
原创 合并顺序表
#include<stdio.h>#include<stdlib.h>#define ok 1#define ERROR 0#define OVERFLOW -1#define INITSIZE 100//预定义容量大小#define INCREMENT 10 //增加的容量typedef int Status;typedef int ElemType;typedef struct{ElemType *elem;int Length;int Listsize;
2020-06-07 19:43:31 169
原创 哈希表
#include<stdio.h>#include<stdlib.h>#define HASHSIZE 12#define OK 1typedef int Status;typedef int ElemType;typedef struct {ElemType *hash;ElemType sum[HASHSIZE]; int numsize;int hashsize;}Hash;Status Chushihua(Hash &H){H.hash
2020-06-07 19:40:48 81
原创 二叉树的构建二叉树,先序遍历,中序遍历,后序遍历
#include<stdio.h>#include<stdlib.h>#include<string.h>#include<conio.h>#define TRUE 1;#define FALSE 0;#define OK 1;#define ERROR 0;#define OVERFLOW -1;#define INFEASIBLE -2;typedef int Status;typedef char Elemtype;typede
2020-06-07 19:39:47 245
五子棋游戏,C语言+ege
2020-06-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人