
数据结构学习
Leslie X徐
頑張ろ
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据结构_链表
链表 1.单向链表 单向单指针操作 /* * 3_stu_input.c 现有学生结构体(id,name,score),写代码实现 (1)从键盘初始化学员 (2)使用链表 (3)遍历打印所有学员 */ #include <stdio.h> #include <stdlib.h> #define SIZE 3 struct student { char name[20]; int id; int score; struct student* next;原创 2021-04-25 23:13:00 · 216 阅读 · 0 评论 -
数据结构_树
树 树和二叉树 元素 父节点 孩子节点 兄弟节点 特殊形式 满二叉树 满二叉树的每一个分支都是满的 完全二叉树 顺序和位置都对应的 满二叉树的一部分 实现 链式存储实现 struct tree { int data; struct tree* left; struct tree* right; }; 数组实现 父子的下标关系: leftchild=2×parent+1; rightchild=2×parent+2; parent=(leftchild-1)/2;原创 2021-04-25 23:09:33 · 149 阅读 · 0 评论