7    VisuAlgo.net / /dfsbfs Login 图遍历(DFS / BFS)
示例模式 ▿

>

>
减速
加速
go to beginning previous frame pause play next frame go to end

Given a graph, we can use the O(V+E) DFS (Depth-First Search) or BFS (Breadth-First Search) algorithm to traverse the graph and explore the features/properties of the graph. Each algorithm has its own characteristics, features, and side-effects that we will explore in this visualization.


This visualization is rich with a lot of DFS and BFS variants (all run in O(V+E)) such as:

  1. Topological Sort algorithm (both DFS and BFS/Kahn's algorithm version),
  2. Bipartite Graph Checker algorithm (both DFS and BFS version),
  3. Cut Vertex & Bridge finding algorithm,
  4. Strongly Connected Components (SCC) finding algorithms
    (both Kosaraju's and Tarjan's version), and
  5. 2-SAT Checker algorithm.

Remarks: By default, we show e-Lecture Mode for first time (or non logged-in) visitor.
Please login if you are a repeated visitor or register for an (optional) free account first.

X Esc
下一个 PgDn

当所选的图遍历算法运行时,将在次处显示动画。


我们使用节点 + 边颜色(颜色方案将很快阐述),偶尔使用节点下的额外的文本(红色字体)来突出显示更改。

所有的图遍历算法都适用于有向图(这是默认设置,其中每个边都有一个箭头指示其反向),但是 Bipartite Graph Check 算法和 Cut Vertex & Bridge 查找算法 需要无向图(通过这种可视化,转换是自动完成的)。

Pro-tip: Since you are not logged-in, you may be a first time visitor who are not aware of the following keyboard shortcuts to navigate this e-Lecture mode: [PageDown] to advance to the next slide, [PageUp] to go back to the previous slide, [Esc] to toggle between this e-Lecture mode and exploration mode.

X Esc
上一个 PgUp
下一个 PgDn

对于指定一个输入图,有两种不同的方法:

  1. 绘制图: 您可以绘制任何未加权的有向图作为输入图(绘制双向边 (u, v) ,您可以绘制两个有向边 u → v and v → u )。
  2. 示例图: 您可以从我们选择的示例图列表中进行挑选,以帮助您入门。

Another pro-tip: We designed this visualization and this e-Lecture mode to look good on 1366x768 resolution or larger (typical modern laptop resolution in 2017). We recommend using Google Chrome to access VisuAlgo. Go to full screen mode (F11) to enjoy this setup. However, you can use zoom-in (Ctrl +) or zoom-out (Ctrl -) to calibrate this.

X Esc
上一个 PgUp
下一个 PgDn

If you arrive at this e-Lecture without having first explore/master the concept of Binary Heap and especially Binary Search Tree, we suggest that you explore them first, as traversing a (Binary) Tree structure is much simpler than traversing a general graph.


Quiz: Mini pre-requisite check. What are the Pre-/In-/Post-order traversal of the binary tree shown (root = vertex 0), left and right child are as drawn?

In = 4, 2, 3, 0, 1
Pre = 0, 2, 4, 3, 1
Post = 1, 3, 4, 2, 0
In = 1, 0, 3, 2, 4
Post = 4, 3, 2, 1, 0
Pre = 0, 1, 2, 3, 4
X Esc
上一个 PgUp
下一个 PgDn
我们通常从(二叉)树的最重要的顶点:节点 开始。
如果给定的树不是“rooted”(参见示例图片),我们可以选择任何一个顶点(例如,示例图片中的顶点0)并将其指定为根。如果我们想象所有边都是相似长度的弦,那么在”实际向上拉指定的根“并让中立向下拉动其余部分之后,我们有一个有根的(向下)树 - 见下一张幻灯片。
PS:从技术上来讲,这种转换是通过运行我们即将探索的 DFS(0) 来实现的。
X Esc
上一个 PgUp
下一个 PgDn
二叉树中,我们最多只有两个相邻的选择:从当前顶点开始,我们可以先到左边的子树,或者先到右边的子树。我们还可以选择在访问其中一个(或两个)子树之前或之后访问当前顶点。
这产生了个有代表性的:前序(访问当前顶点,访问其左子树,访问其右子树),中序(左,当前,右),和后序(左,右,当前)遍历。
讨论:您是否注意到还有其它三种可能的二叉树的遍历组合?他们是什么?
X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn
一个二叉树中,或者概括来说 一个树结构,不包含大于三个不同的顶点(我们不考虑那些连通两个顶点的双向路径所产生的小圈 我们可以很容易的处理掉它们 - 往前翻三页)
X Esc
上一个 PgUp
下一个 PgDn

In general graph, we do not have the notion of root vertex. Instead, we need to pick one distinguished vertex to be the starting point of the traversal, i.e. the source vertex s.


We also have 0, 1, ..., k neighbors of a vertex instead of just ≤ 2.


We may (or actually very likely) have cycle(s) in our general graph instead of acyclic tree,
be it the trivial one like u → v → u or the non-trivial one like a → b → c → a.


But fret not, graph traversal is an easy problem with two classic algorithms: DFS and BFS.

X Esc
上一个 PgUp
下一个 PgDn
最基本的图遍历算法之一是 O(V+E) 深度优先搜索(DFS)。
DFS 采用一个输入参数:源点 s
DFS 是最基本的图的算法之一,因此请花时间了解该算法的关键步骤。
X Esc
上一个 PgUp
下一个 PgDn

mazeThe closest analogy of the behavior of DFS is to imagine a maze with only one entrance and one exit. You are at the entrance and want to explore the maze to reach the exit. Obviously you cannot split yourself into more than one.


Ask these reflective questions before continuing: What will you do if there are branching options in front of you? How to avoid going in cycle? How to mark your own path? Hint: You need a chalk, stones (or any other marker) and a (long) string.

X Esc
上一个 PgUp
下一个 PgDn
顾名思义,DFS从一个已知的源顶点  s 使用递归(隐式堆)来控制访问顺序为走到最深再返回。

如果DFS在顶点 u 并且它有 X 个邻居,它会选择第一个邻居 V1 (通常是序号最小的那个顶点), 使用递归访问所有 V1可以到达的顶点, 最终返回顶点 u. DFS 接下来对其他的邻居做同样的事指导探索完成最后一个邻居 VX 和它所能触及到的顶点.

等下看了DFS的动画 这个冗长的解释会变得清晰起来。
X Esc
上一个 PgUp
下一个 PgDn

如果一个图是圈,之前的“尝试所有”的方法可能让DFS陷入循环。所以DFS的基本形式用一个大小为 V 个顶点的数组 status[u] 来确定两种情况 分别为 u 已经被访问过了 或者没有被访问过。只有当 u 还没有被访问过的时候 DFS才可以访问顶点 u.


当DFS没有路可走的时候它会跳出当前的递归 回去 到之前的顶点 (p[u], 看下一页).

X Esc
上一个 PgUp
下一个 PgDn

DFS 用另一个大小为 V 个顶点数组 p[u] 来记住在DFS遍历路径上每一个顶点 uparent/predecessor/previous(父/祖先/前)

最开始的顶点的祖先也就是 p[s] 被设定为-1也就是说它没有祖先 (因为最低的顶点是顶点0).

从一个源顶点 s 到一个可以到达的顶点 u 所生成的路径反过来 就是 DFS 生成树. 我们给这些 树路径红色.

X Esc
上一个 PgUp
下一个 PgDn

现在,忽略显示的伪代码中额外的 status[u] = explored 以及可视化中的 蓝色灰色 边的存在 (将很快会解释)。

不用多说,让我们在这个 e-Lecture 的默认示例图上执行 DFS(0) (CP3 Figure 4.1)。 Recap DFS Example
到目前为止,DFS 的基本版本已经足够用于大多数的简单案例。
X Esc
上一个 PgUp
下一个 PgDn

DFS 的时间复杂度是 O(V+E) ,因为:

  1. 每个节点只访问过一次,因为 DFS 将仅递归地探索节点 u 如果 status[u] = unvisited — O(V)
  2. 每次访问完一个节点,都会探索其所有 k 个邻点,因此在访问所有节点之后,我们已检查了所有 E 边 — (O(E) ,因为i每个节点的邻点总数等于 E)。
X Esc
上一个 PgUp
下一个 PgDn

DFS 的he O(V+E) 时间复杂度只有当我们可以在 O(k) 时间内访问一个顶点的所有 k 个邻点时才可以实现。

Quiz: Which underlying graph data structure support that operation?

Edge List
Adjacency Matrix
Adjacency List

讨论:为什么?
X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn
另一种基本的图遍历算法是 O(V+E) 广度优先搜索 (BFS)。
与 DFS 一样,BFS 也采用一个输入参数:源点 s
DFS 和 BFS 都有自己的优点和缺点。学习两者并对正确的情况采用正确的图遍历算法是非常重要的。
X Esc
上一个 PgUp
下一个 PgDn
想象一下静止的水,然后你扔石头。石头撞击水面的第一个位置是源点的位置,并且随后在水面上的波纹效应类似于 BFS 遍历模式。
X Esc
上一个 PgUp
下一个 PgDn

BFS 与之前讨论过的非常相似,但有一些差异。

BFS 从源点 s 开始,但它在更深入之前使用 queue 尽最宽可能地将访问序列排序。


BFS 还是用大小为 V 节点的布尔数组来区分两种不同的状态:已访问节点和未访问节点(我们不会像使用 DFS 那样使用 BFS 来检测反向边)。

在此可视化中,我们还展示从未加权图中的相同源点 s 开始,此图的 BFS 生成树等于其 SSSP spanning tree.
X Esc
上一个 PgUp
下一个 PgDn

Without further ado, let's execute BFS(5) on the default example graph for this e-Lecture (CP3 Figure 4.3). Recap BFS Example.


Notice the Breadth-first exploration due to the usage of FIFO data structure: Queue?

X Esc
上一个 PgUp
下一个 PgDn

BFS的时间复杂度是 O(V+E),因为:

  1. 每一个顶点都被访问一次 因为它们只能进入队列一次— O(V)
  2. 每当一个顶点从队列中出队时,所有它的 k 个邻居都会被探索 所以当所有的顶点都被访问过后,我们一共探索了 E 条路径 — (O(E) 因为每个顶点的邻居总数为 E).

对于DFS来说 O(V+E) 只有在用 邻接表 图数据结构 — 和DFS分析相同

X Esc
上一个 PgUp
下一个 PgDn

到现在为止,我们可以用 DFS/BFS 去解决一些遍历图的问题变种:

  1. 探测图是否有圈(cyclic)
  2. 显示出遍历路径
  3. 检测可达性
  4. 分辨/计数/标记 一个无向图连接的部分(CCs)
  5. 拓补排序(只在有向无圈图 DAG中)

多数的数据结构和算法课程只传授这些 DFS/BFS 的基本应用,尽管它们可以做更多...

X Esc
上一个 PgUp
下一个 PgDn

We can actually augment the basic DFS further to give more insights about the underlying graph.


In this visualization, we use blue color to highlight back edge(s) of the DFS spanning tree. The presence of at least one back edge shows that the traversed graph (component) is cyclic while its absence shows that at least the component connected to the source vertex of the traversed graph is acyclic.

X Esc
上一个 PgUp
下一个 PgDn

Back edge can be detected by modifying array status[u] to record three different states:

  1. unvisited: same as earlier, DFS has not reach vertex u before,
  2. explored: DFS has visited vertex u, but at least one neighbor of vertex u has not been visited yet (DFS will go depth-first to that neighbor first),
  3. visited: now stronger definition: all neighbors of vertex u have also been visited and DFS is about to backtrack from vertex u to vertex p[u].

If DFS is now at vertex x and explore edge x → y and encounter status[y] = explored, we can declare x → y is a back edge (a cycle is found as we were previously at vertex y (hence status[y] = explored), go deep to neighbor of y and so on, but we are now at vertex x that is reachable from y but vertex x leads back to vertex y).

X Esc
上一个 PgUp
下一个 PgDn

The edges in the graph that are not tree edge(s) nor back edge(s) are colored grey. They are called forward or cross edge(s) and currently have limited use (not elaborated).


Now try DFS(0) on the example graph above with this new understanding, especially about the 3 possible status of a vertex (unvisited/normal black circle, explored/blue circle, visited/orange circle) and back edge. Edge 2 → 1 will be discovered as a back edge as it is part of cycle 1 → 3 → 2 → 1 (similarly with Edge 6 → 4 as part of cycle 4 → 5 → 7 → 6 → 4).

X Esc
上一个 PgUp
下一个 PgDn

我们可以使用以下简单的递归函数来打印出存储在数组 p 中的路径。可能的后续讨论:您能以迭代的形式写出来吗?(容易解决的)

method backtrack(u)
if (u == -1) stop
backtrack(p[u]);
output vertex u

要打印图中从源点到目标顶点 t 的路径,可以调用 O(V+E) DFS(s) (或 BFS(s)) ,然后调用 O(V) 去返回 (t)。示例: s = 0t = 4,您可以调用 DFS(0) 然后回溯 (4)。 Elaborate

X Esc
上一个 PgUp
下一个 PgDn

如果您被要求测试图中的节点 s 和一个(不同的)节点 t 是否可达,即直接连接(通过一条边)或间接连接(通过简单的非环路径),则可以调用 O(V+E) DFS(s) (或 BFS(s)) 并检查是否 status[t] = visited。

例子 1: s = 0t = 4, 运行 DFS(0) 并注意 status[4] = visited. 例子 2: s = 0t = 7, 运行 DFS(0) 并注意 status[7] = unvisited.

X Esc
上一个 PgUp
下一个 PgDn

我们可以通过简单地调用 O(V+E) DFS(s) (或 BFS(s)) 来枚举从无向图中的节点 s 可到达的所有节点(如上图的示例图所示),并枚举所有 status[v] = visited 的节点 v

示例: s = 0,运行 DFS(0) 并注意 status[{0,1,2,3,4}] = visited,因此它们都是从节点 0 可到达的节点,即它们形成一个连通分量(CC)
X Esc
上一个 PgUp
下一个 PgDn

我们可以用如下的伪代码来计数连接部分(CCs)的数量:

CC = 0
for all u in V, set status[u] = unvisited
for all u in V
if (status[u] == unvisited)
CC++ // 我们可以用CC计数器的数量来标记CC
DFS(u) // 或者 BFS(u), 来标记它的成员为已访问
output CC // 上面的示例图的答案是3
// CC 0 = {0,1,2,3,4}, CC 1 = {5}, CC 2 = {6,7,8}

如果你想要给每一个CC你自己的标记 你可以修改一点 DFS(u)/BFS(u) 的代码

X Esc
上一个 PgUp
下一个 PgDn

Quiz: What is the time complexity of Counting the Number of CCs algorithm?

It is still O(V+E)
Trick question, the answer is none of the above, it is O(_____)
Calling O(V+E) DFS/BFS V times, so O(V*(V+E)) = O(V^2 + VE)

讨论:为什么?
X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn

还有另一个可以被视为”简单“的 DFS(以及 BFS)应用:执行有向五环图(DAG)的拓扑排序 — 参见上面的示例。

DAG 的拓扑排序是此 DAG 的节点的线性排序,其中每个节点位于其传出边所连接的所有节点之前。
每个 DAG 至少有一个但可能更多的拓扑排序/秩序。
其中一个DAG的拓扑排序的主要目的(至少一个)是用于 Dynamic Programming (DP) 技术。例如,此拓扑排序过程用在 DP solution for SSSP on DAG.内部。
X Esc
上一个 PgUp
下一个 PgDn

我们可以使用 O(V+E) DFS 或 BFS 来执行有向无环图(DAG)的拓扑排序。

与普通 DFS 相比,DFS 版本只需要额外的一行,基本上是此图的后序遍历。在示例的DAG上尝试 Toposort (DFS)
BFS 版本基于没有传入边的节点的概念,也称为 Kahn 算法.。在示例的DAG上尝试 Toposort (BFS/Kahn's)
X Esc
上一个 PgUp
下一个 PgDn

As of now, you have seen DFS/BFS and what it can solve (with just minor tweaks). There are a few more advanced applications that require more tweaks and we will let advanced students to explore them on their own:

  1. Bipartite Graph Checker (DFS and BFS variants),
  2. Finding Articulation Points (Cut Vertices) and Bridges of an Undirected Graph (DFS only),
  3. Finding Strongly Connected Components (SCCs) of a Directed Graph (Tarjan's and Kosaraju's algorithms), and
  4. 2-SAT(isfiability) Checker algorithms.

Advertisement: The details are written in Competitive Programming book.

X Esc
上一个 PgUp
下一个 PgDn

We can use the O(V+E) DFS or BFS (they work similarly) to check if a given graph is a Bipartite Graph by giving alternating color (orange versus blue in this visualization) between neighboring vertices and report 'non bipartite' if we ends up assigning same color to two adjacent vertices or 'bipartite' if it is possible to do such '2-coloring' process. Try DFS_Checker or BFS_Checker on the example Bipartite Graph.


Bipartite Graphs have useful applications in (Bipartite) Graph Matching problem.


Note that Bipartite Graphs are usually only defined for undirected graphs so this visualization will convert directed input graphs into its undirected version automatically before continuing. This action is irreversible and you may have to redraw the directed input graph again for other purposes.

X Esc
上一个 PgUp
下一个 PgDn

We can modify (but unfortunately, not trivially) the O(V+E) DFS algorithm into an algorithm to find Cut Vertices & Bridges of an Undirected Graph.


A Cut Vertex, or an Articulation Point, is a vertex of an undirected graph which removal disconnects the graph. Similarly, a bridge is an edge of an undirected graph which removal disconnects the graph.


Note that this algorithm for finding Cut Vertices & Bridges only works for undirected graphs so this visualization will convert directed input graphs into its undirected version automatically before continuing. This action is irreversible and you may have to redraw the directed input graph again for other purposes. You can try to Find Cut Vertices & Bridges on the example graph above.

X Esc
上一个 PgUp
下一个 PgDn

We can modify (but unfortunately, not trivially) the O(V+E) DFS algorithm into an algorithm to find Strongly Connected Components (SCCs) of a Directed Graph G.


An SCC of a directed graph G a is defined as a subgraph S of G such that for any two vertices u and v in S, vertex u can reach vertex v directly or via a path, and vertex v can also reach vertex u back directly or via a path.


There are two known algorithms for finding SCCs of a Directed Graph: Kosaraju's and Tarjan's. Both of them are available in this visualization. Try Kosaraju's Algorithm and/or Tarjan's Algorithm on the example directed graph above.

X Esc
上一个 PgUp
下一个 PgDn

We also have the 2-SAT Checker algorithm. Given a 2-Satisfiability (2-SAT) instance in the form of conjuction of clauses: (clause1) ^ (clause2) ^ ... ^ (clausen) and each clause is in form of disjunction of up to two variables (vara v varb), determine if we can assign True/False values to these variables so that the entire 2-SAT instance is evaluated to be true, i.e. satisfiable.


It turns out that each clause (a v b) can be turned into four vertices a, not a, b, and not b with two edges: (not a → b) and (not b → a). Thus we have a Directed Graph. If there is at least one variable and its negation inside an SCC of such graph, we know that it is impossible to satisfy the 2-SAT instance.


After such directed graph modeling, we can run an SCC finding algorithm (Kosaraju's or Tarjan's algorithm) to determine the satisfiability of the 2-SAT instance.

X Esc
上一个 PgUp
下一个 PgDn

Quiz: Which Graph Traversal Algorithm is Better?

Always DFS
Always BFS
Both are Equally Good
It Depends on the Situation

讨论:为什么?

X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn
我们仍然可以只用 DFS/BFS 做很多事情......
X Esc
上一个 PgUp
下一个 PgDn

There are interesting questions about these two graph traversal algorithms: DFS+BFS and variants of graph traversal problems, please practice on Graph Traversal training module (no login is required, but short and of medium difficulty setting only).


However, for registered users, you should login and then go to the Main Training Page to officially clear this module and such achievement will be recorded in your user account.

X Esc
上一个 PgUp
下一个 PgDn

We also have a few programming problems that somewhat requires the usage of DFS and/or BFS: Kattis - reachableroads and Kattis - breakingbad.


Try to solve them and then try the many more interesting twists/variants of this simple graph traversal problem and/or algorithm. You are allowed to use/modify our implementation code for DFS/BFS Algorithms that can be downloaded Here (ch4_01_dfs.cpp/java, ch4_04_bfs.cpp/java from the companion Competitive Programming book website).

X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn
当操作进行时,状态面板将会有每个步骤的描述。
X Esc
上一个 PgUp
下一个 PgDn

e-Lecture: The content of this slide is hidden and only available for legitimate CS lecturer worldwide. Drop an email to visualgo.info at gmail dot com if you want to activate this CS lecturer-only feature and you are really a CS lecturer (show your University staff profile).

X Esc
上一个 PgUp
下一个 PgDn
使用用户控件控制动画!可用的快捷键有:
空格键:绘制/停止/重绘
左/右箭头:上一步/下一步
-/+:减缓/增加速度

X Esc
上一个 PgUp
下一个 PgDn

Return to 'Exploration Mode' to start exploring!


Note that if you notice any bug in this visualization or if you want to request for a new visualization feature, do not hesitate to drop an email to the project leader: Dr Steven Halim via his email address: stevenhalim at gmail dot com.

X Esc
上一个 PgUp

绘制图表

图示

深度优先搜索(s)

广度优先搜说(s)

拓扑排序

二分图检查

切断顶点/ 桥

SCC 算法

2-SAT 检查

>

CP3 4.1

CP3 4.3

CP3 4.4 DAG

CP3 4.9

CP3 4.17 DAG

CP3 4.18 DAG, Bipartite

CP3 4.19 Bipartite

s =

执行

s =

执行

DFS 版本

BFS 版本 (Kahn's 算法)

DFS 版本

BFS 版本

Kosaraju 算法

Tarjan 算法

条款的数量 = , 变量的数量 =

关于 团队 使用条款

关于

VisuAlgo在2011年由Steven Halim博士概念化,作为一个工具,帮助他的学生更好地理解数据结构和算法,让他们自己和自己的步伐学习基础。
VisuAlgo包含许多高级算法,这些算法在Steven Halim博士的书(“竞争规划”,与他的兄弟Felix Halim博士合作)和其他书中讨论。今天,一些高级算法的可视化/动画只能在VisuAlgo中找到。
虽然专门为新加坡国立大学(NUS)学生采取各种数据结构和算法类(例如CS1010,CS1020,CS2010,CS2020,CS3230和CS3230),作为在线学习的倡导者,我们希望世界各地的好奇心发现这些可视化也很有用。
VisuAlgo不是从一开始就设计为在小触摸屏(例如智能手机)上工作良好,因为需要满足许多复杂的算法可视化,需要大量的像素和点击并拖动手势进行交互。一个令人尊敬的用户体验的最低屏幕分辨率为1024x768,并且只有着陆页相对适合移动设备。
VisuAlgo是一个正在进行的项目,更复杂的可视化仍在开发中。
最令人兴奋的发展是自动问题生成器和验证器(在线测验系统),允许学生测试他们的基本数据结构和算法的知识。这些问题是通过一些规则随机生成的,学生的答案会在提交给我们的评分服务器后立即自动分级。这个在线测验系统,当它被更多的世界各地的CS教师采用,应该技术上消除许多大学的典型计算机科学考试手动基本数据结构和算法问题。通过在通过在线测验时设置小(但非零)的重量,CS教练可以(显着地)增加他/她的学生掌握这些基本问题,因为学生具有几乎无限数量的可以立即被验证的训练问题他们参加在线测验。培训模式目前包含12个可视化模块的问题。我们将很快添加剩余的8个可视化模块,以便VisuAlgo中的每个可视化模块都有在线测验组件。
另一个积极的发展分支是VisuAlgo的国际化子项目。我们要为VisuAlgo系统中出现的所有英语文本准备一个CS术语的数据库。这是一个很大的任务,需要众包。一旦系统准备就绪,我们将邀请VisuAlgo游客贡献,特别是如果你不是英语母语者。目前,我们还以各种语言写了有关VisuAlgo的公共注释:
zh, id, kr, vn, th.

团队

项目领导和顾问(2011年7月至今)
Dr Steven Halim, Senior Lecturer, School of Computing (SoC), National University of Singapore (NUS)
Dr Felix Halim, Software Engineer, Google (Mountain View)

本科生研究人员 1 (Jul 2011-Apr 2012)
Koh Zi Chun, Victor Loh Bo Huai

最后一年项目/ UROP学生 1 (Jul 2012-Dec 2013)
Phan Thi Quynh Trang, Peter Phandi, Albert Millardo Tjindradinata, Nguyen Hoang Duy

最后一年项目/ UROP学生 2 (Jun 2013-Apr 2014)
Rose Marie Tan Zhao Yun, Ivan Reinaldo

本科生研究人员 2 (May 2014-Jul 2014)
Jonathan Irvin Gunawan, Nathan Azaria, Ian Leow Tze Wei, Nguyen Viet Dung, Nguyen Khac Tung, Steven Kester Yuwono, Cao Shengze, Mohan Jishnu

最后一年项目/ UROP学生 3 (Jun 2014-Apr 2015)
Erin Teo Yi Ling, Wang Zi

最后一年项目/ UROP学生 4 (Jun 2016-Dec 2017)
Truong Ngoc Khanh, John Kevin Tjahjadi, Gabriella Michelle, Muhammad Rais Fathin Mudzakir

List of translators who have contributed ≥100 translations can be found at statistics page.

致谢
这个项目是由来自NUS教学与学习发展中心(CDTL)的慷慨的教学增进赠款提供的。

使用条款

VisuAlgo是地球上的计算机科学社区免费。如果你喜欢VisuAlgo,我们对你的唯一的要求就是通过你知道的方式,比如:Facebook、Twitter、课程网页、博客评论、电子邮件等告诉其他计算机方面的学生/教师:VisuAlgo网站的神奇存在
如果您是数据结构和算法学生/教师,您可以直接将此网站用于您的课程。如果你从这个网站拍摄截图(视频),你可以使用屏幕截图(视频)在其他地方,只要你引用本网站的网址(http://visualgo.net)或出现在下面的出版物列表中作为参考。但是,您不能下载VisuAlgo(客户端)文件并将其托管在您自己的网站上,因为它是剽窃。到目前为止,我们不允许其他人分叉这个项目并创建VisuAlgo的变体。使用(客户端)的VisuAlgo的离线副本作为您的个人使用是很允许的。
请注意,VisuAlgo的在线测验组件本质上具有沉重的服务器端组件,并且没有简单的方法来在本地保存服务器端脚本和数据库。目前,公众只能使用“培训模式”来访问这些在线测验系统。目前,“测试模式”是一个更受控制的环境,用于使用这些随机生成的问题和自动验证在NUS的实际检查。其他感兴趣的CS教练应该联系史蒂文如果你想尝试这样的“测试模式”。
出版物名单
这项工作在2012年ACM ICPC世界总决赛(波兰,华沙)和IOI 2012年IOI大会(意大利Sirmione-Montichiari)的CLI讲习班上进行了简要介绍。您可以点击此链接阅读我们2012年关于这个系统的文章(它在2012年还没有被称为VisuAlgo)。
这项工作主要由我过去的学生完成。最近的最后报告是:Erin,Wang Zi,Rose,Ivan。
错误申报或请求添加新功能
VisuAlgo不是一个完成的项目。 Steven Halim博士仍在积极改进VisuAlgo。如果您在使用VisuAlgo并在我们的可视化页面/在线测验工具中发现错误,或者如果您想要求添加新功能,请联系Dr Steven Halim博士。他的联系邮箱是他的名字加谷歌邮箱后缀:StevenHalim@gmail.com。