From 8e875cfa4590a65124c3c4eb84f54633303c24d0 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Mon, 4 Apr 2022 16:24:28 -0700 Subject: [PATCH] doc: create graph section --- source/_posts/数据结构.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/_posts/数据结构.md b/source/_posts/数据结构.md index 9b4a8f1..81b7567 100644 --- a/source/_posts/数据结构.md +++ b/source/_posts/数据结构.md @@ -208,4 +208,12 @@ set.contains(3); //return false 并查集 是一种树形的数据结构,用于处理不交集的合并(union)及查询(find)问题。找几个数字是否在同一个group里面 Find:确定元素属于哪一个子集。它可以被用来确定两个元素是否属于同一子集。 Union:将两个子集合并成同一个集合。 -![union-find](/images/union-find.png) \ No newline at end of file +![union-find](/images/union-find.png) + +## Graph(图) +我们知道,数据之间的关系有 3 种,分别是 "一对一"、"一对多" 和 "多对多",前两种关系的数据可分别用线性表和树结构存储,本节学习存储具有"多对多"逻辑关系数据的结构——图存储结构。 +![undirectivevsdirected](/images/undirectivevsdirective.png) +![cyclicvsasyclic](/images/cyclicvsasyclic.png) +![graph](/images/graph.png) +![邻接表](/images/邻接表.png) +![邻接矩阵](/images/邻接矩阵.png) \ No newline at end of file