数据结构学习
Leslie X徐
頑張ろ
展开
-
数据结构_链表
链表1.单向链表单向单指针操作/* * 3_stu_input.c现有学生结构体(id,name,score),写代码实现(1)从键盘初始化学员(2)使用链表(3)遍历打印所有学员 */#include <stdio.h>#include <stdlib.h>#define SIZE 3struct student { char name[20]; int id; int score; struct student* next;原创 2021-04-25 23:13:00 · 163 阅读 · 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 · 115 阅读 · 0 评论