跳到主要内容

资源 · 指南或文章

Graph

用两段话定义图这一抽象数据类型,涵盖顶点、边以及有向与无向的区别。

审核日期

打开原站: Graph (在新标签页中打开原网站)

练习这个主题打开练习面试官,并带上一道关于 图 的题目。

添加到路线图

把这个资源放进你正在跟进的路线图。它会作为你自己的补充资源显示;路线图的步骤不会改变,也不计入你已记录的步骤。

来源内容语言:英语

Read this in other languages: 简体中文, Русский, Français, Português, Українська In computer science, a graph is an abstract data type that is meant to implement the undirected graph and directed graph concepts from mathematics, specifically the field of graph theory A graph data structure consists of a finite (and possibly mutable) set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known as edges, arcs, or lines for an undirected graph and as arrows, directed edges, directed arcs, or directed lines for a directed graph. The vertices may be part of the graph structure, or may be external entities represented by integer indices or references.

PrepKit 概览

本概览由 PrepKit 编辑根据源代码仓库撰写并审核,并非资源本身的文字。

适合人群
来源未说明适用级别
形式
参考资料

涵盖内容

  • 无向边和有向边的术语,附示意图
  • 链接到入门视频和图表示方法的视频

使用建议

这是 PrepKit 的学习建议,并非来源的说法。

为同一个小图分别构建邻接表和邻接矩阵,然后解释你在什么情况下会选择各自的表示方式。

范围与局限

没有讨论邻接表或邻接矩阵,没有操作,也没有复杂度表。有用的内容都在链接的视频中。

获取方式与形式

GitHub 上的简短 README,trekhleb/javascript-algorithms(MIT),附有五种译本的链接。英文,免费。

PrepKit 于 2026年10月2日 审核。 资源来源提交: 85293e3e2b88

本概览的依据
  • src/data-structures/graph/README.md

收录此条目的页面

订阅 PrepKit 通讯

可选。使用 PrepKit 并不需要订阅。

我们如何处理你的邮箱