算法精粹(algorithm-essentials)

感谢soulmachine@github提供内容
# 图

无向图的节点定义如下:

{% if book.cpp %}
```cpp
// 无向图的节点
struct UndirectedGraphNode {
int label;
vector neighbors;
UndirectedGraphNode(int x) : label(x) {};
};
```
{% endif %}

{% if book.java %}
```java
// 无向图的节点
class UndirectedGraphNode {
int label;
ArrayList neighbors;
UndirectedGraphNode(int x) { label = x;}
};
```
{% endif %}