- 博客(6)
- 收藏
- 关注
原创 dfs深度优先搜索探究迷宫的最短路径(C++)
以下有个 6*6 的迷宫6 60 1 0 0 1 00 0 0 0 0 11 0 1 1 0 00 0 0 1 0 00 1 0 0 0 10 0 0 1 0 0根据上图寻找的最短路径如下:按照红色路径走时的坐标如下(0,0) -> (1,0) -> (1,1) -> (1,2) -> (1,3) -> (1,4) -> (2,4) -> (3,4) -> (4,4) -> (5,4) -> (5,5)按照蓝..
2022-04-15 23:31:30
4414
2
原创 链队列(C++实现)
#include<iostream>using namespace std;typedef struct Qnode{ int data; struct Qnode * next;}Node;typedef struct node{ Node * front; Node * rear;}NodePointer;void InitQueue(NodePointer & q) //初始化链队列的双指针{ q...
2022-04-15 10:56:51
1046
2
原创 链队列系统(C++实现)
链队列的功能如下:初始化链队列的双指针void InitQueue(NodePointer & q) //初始化链队列的双指针{ q.front = (Node *)malloc(sizeof(Node)); q.rear = (Node *)malloc(sizeof(Node)); q.front = q.rear; q.front->next = nullptr; q.rear->next = nullptr;
2022-04-13 21:33:07
802
原创 针对链队列的添加节点元素遇到的问题的思考和解决
下面这段是个错误的例子,是本人写的一个错误的情况,以此例子展开一个探索性学习,加深自身对代码运行的理解。如有错误,欢迎指出,一起成长,一起学习#include<iostream>using namespace std;typedef struct node{ int data; struct node * next;}Node;typedef struct Qnode{ Node * front; Node * rear;}NodePoint...
2022-04-13 21:19:58
872
原创 简单实现通讯录系统C++版
#include<iostream>#include<string> //string头文件 #define MAX_NUM 100using namespace std;struct people{ string per_name; //姓名 int per_sex; //性别 int per_age; //年龄 string per_phone; //电话 string per_address; //地址 };struct AddMen.
2022-02-07 19:07:30
338
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅