摘要:
maze.h: #pragma once #include<stdio.h> #include<stdlib.h> #define MAXSIZE 100 typedef struct _Position {//迷宫坐标 int _x; int _y; }Position; #define MaxS
阅读全文
posted @ 2023-03-06 20:12
wshidaboss
阅读(69)
推荐(0)
摘要:
#include <iostream> #include <string.h> using namespace std; typedef int SElemType; typedef struct StackNode { SElemType data; struct StackNode* next;
阅读全文
posted @ 2023-03-06 16:50
wshidaboss
阅读(59)
推荐(0)
摘要:
1.堆排序(Heapsort)是指利用堆这种数据结构所设计的一种排序算法,它是选择排序的一种。可以利用数组的特 点快速定位指定索引的元素。 2.(选择排序工作原理 - 第一次从待排序的数据元素中选出最小(或最大)的一个元素,存放在序列的起始位置, 然后再从剩余的未排序元素中寻找到最小(大)元素,然后
阅读全文
posted @ 2023-03-06 14:31
wshidaboss
阅读(65)
推荐(0)
摘要:
#include <stdio.h> #include <stdlib.h> #include <string.h> //堆的算法实现 #define DEFAULT_CAPCITY 128 typedef struct _Heap { int* arr; //存储堆元素的数组 int size;
阅读全文
posted @ 2023-03-04 19:35
wshidaboss
阅读(36)
推荐(0)
摘要:
#include <iostream> #include <Windows.h> #include <iomanip> //优先级队列的实现 using namespace std; #define MaxSize 5 typedef int DataType; //队列中的元素类型 typedef
阅读全文
posted @ 2023-03-04 10:30
wshidaboss
阅读(100)
推荐(0)
摘要:
//使用数组实现队列 #include <iostream> #include <Windows.h> using namespace std; #define MAXSIZE 5 //队列的最大容量 typedef int DataType; //队列中的元素类型 typedef struct Q
阅读全文
posted @ 2023-03-03 13:31
wshidaboss
阅读(171)
推荐(0)
摘要:
#include <iostream> #include <Windows.h> using namespace std; #define MAXSIZE 6 //顺序栈的实现 typedef struct { int* base; int* top; int stacksize; int Leng
阅读全文
posted @ 2023-02-14 15:19
wshidaboss
阅读(64)
推荐(0)
摘要:
#include <iostream> #include <Windows.h> using namespace std; typedef struct _QNode{ int data; struct _QNode* next; }QNode; typedef struct { QNode* fr
阅读全文
posted @ 2023-02-08 19:17
wshidaboss
阅读(48)
推荐(0)
摘要:
#include <iostream> #include <Windows.h> using namespace std; #define MAXSIZE 6 typedef int QElemType; typedef struct { QElemType* base;//基地址 int rear
阅读全文
posted @ 2023-02-03 23:19
wshidaboss
阅读(62)
推荐(0)
摘要:
#include <iostream> #include <Windows.h> #define MAX_SIZE 100 using namespace std; //单链表 typedef struct _LinkList { int data;//数据域 struct _LinkList* n
阅读全文
posted @ 2023-01-24 22:44
wshidaboss
阅读(753)
推荐(0)