10.2 Graph Terminology 图的术语
Undirected Graph G(V,E) 无向图 Vertex ,edge adjacent(neighbors) 若{u,v}是无向图G的边,则两个顶点u和v称为在无向图G里邻接(相邻)。 incident with u and v 边e称为…
1.vector的介绍和使用 vector实际上是一个类模板,allocator (对象分配的元素的类型) 是第二个模板参数。 2.vector的使用
(1) vector的定义 int TestVector1()
{// constructors used in the same order as described above:vector<int> first; …
4 Tree
1. Tree 树
定义: A tree T is a collection of nodes(element). 树T是结点的集合The collection can be empty; otherwise, a tree consists of a distinguished node r, called the root, and zero or more nonempty(sub)trees T1, T2, ……, Tk(这个集合可能为空&a…