数据结构与算法
记录主要数据结构的思想和实现代码(C++实现)
想不到什么名字的小篛蒟
这个作者很懒,什么都没留下…
展开
-
使用带头结点的单向链表实现通讯录功能(C++实现)
通讯录功能:增加联系人、查找联系人、删除联系人、查看所有联系人#include <iostream>using namespace std;/* run this program using the console pauser or add your own getch, system("pause") or input loop *///定义通讯录中名单结构体 :链表结点 struct Infor { string name; string phone; string ad原创 2021-02-04 13:43:09 · 564 阅读 · 0 评论 -
链表操作具体代码实现(菜鸡本鸡使用C++实现)
带头结点的单向链表相关操作代码实现如下:#include <iostream>#include <stdlib.h> using namespace std;/* 带头结点的单向链表的操作 */struct Node { int data; //数据域 Node *next; //指针域 };//链表的创建Node *create() { Node *head, *r; //head是头指针,r是尾指针 head = new Node; r = head;原创 2021-02-04 13:37:53 · 129 阅读 · 0 评论