}
}
void dfs(int row)//其会遍历许多次,因为有许多不同的摆法,每种摆法都要遍历八行才可打印
{
if(row==8)//表示一种方法遍历完毕
{
reflect();
}
for(int i=0;i<8;i++)
{
queen_col[row] = i;//将列代入
if(check(row)!=0)
{
hash[row][i] = 1;//满足即放上,与后面打印中的赋值操作有关系的
dfs(row+1);
hash[row][i] = 0;//“回溯”操作
//因为在前面的dfs递归完成后即代表八行已经遍历过了,即一种方法已经确定了,因此我们可以“回溯”了
}
}
}
int main()
{
dfs(0);//将第一行代入
return 0;
}
优惠劵
向光.
关注
关注
1
点赞
踩
2
收藏
觉得还不错?
一键收藏
打赏
知道了
0
评论
DFS----深度优先搜索与记忆化数组例题分析
DFSDFS(即深度优先搜索)是一种利用递归和循环结构将所有可能的路径和方法都搜索一遍的方式,其本质上与暴力解法类似,不过是利用了递归结构省去了大量代码。主要思想是运用了回溯,保存这次的位置并深入搜索,都搜索完便回溯回来,搜下一个位置,直到把所有最深位置都搜一遍(找到目的解返回或者全部遍历完返回一个事先定好的值)。要注意的一点是,搜索的时候有记录走过的位置,标记完后可能要改回来。例题1:滑雪问题Michael喜欢滑雪这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑
复制链接
扫一扫
专栏目录
对记忆化搜索+深度优先搜索的理解与比较
qq_45706306的博客
12-17
541
#记忆化搜索是动态规划和搜索的综合体,结合了两者的优点。因为动态规划往往要遍历所有的状态,而搜索可以排除一些无效状态。更重要的是搜索还可以剪枝(比如0-1背包问题减去了大量的无用搜索),因此在时间和空间开销上往往比动态规划要低很多。记忆化算法在求解的时候还是按着自顶向下的顺序,但是每求解一个状态,就将它的解保存下来,以后再次遇到这个状态的时候,就不必重新求解了。
#深度优先搜索属于图算法的一种,缩写为DFS。其过程简要来说是对每一个可能的分支路径深入到不能再深入为止,而且每个节点只能访问一次,特别的它在搜索
深度优先搜索(DFS)剪枝:记忆化搜索(C++)
小天狼星_布莱克 的博客
12-10
2403
今天我们来讲一下深搜的剪枝方法中的一个:记忆化搜索。顾名思义,记忆化搜索就是让程序记住一些东西,然后可以在需要用的时候可以瞬间调用,不需要再进行一次复杂的计算!首先,记忆需要大脑来存储数据,什么来模拟大脑? 数组其次,记忆需要现有的知识用来记住,知识从哪里来? 以前求出的数据。这样,我们如果要用到以前求过的数据,就可以从数组中调用,可以大大提高我们程序的运行速度。
参与评论
您还未登录,请先
登录
后发表或查看评论
记忆数组
beijingFC的博客
12-18
297
记忆数组
斐波那契数 优化
#include
using namespace std;
long long num[50];
long long f(int n){
if(n==0||n==1) return 1;
if(num[n]) return num[n];
return num[n]= f(n-1) + f(n-2);
}
int main(){
for(int i=1;i<=40;i++){
cout<
动态规划经验分享
weixin_60295600的博客
04-20
131
动态规划适用场景
一般使用暴力搜索的题都可用动态规划进行优化。进行枚举(暴力搜索)时会出现重复的子问题,这些重复的子问题会大大增加程序运行所需时间,动态规划的出现就是解决重复子问题重复出现的情况,使用记忆数据将子问题的最优解记录下来,下次直接重记忆数组中取就好了。
动态规划的构成
1.记忆数组:在问题回溯过程中,使用记忆数组记录当前问题的最优解,方便我们在遇到重复子问题时不用再计算,直接在表中取值就行。
2.状态转移方程: 状态转移方程分为两部分
1> 初始状态:想当于出口,也就是最小子问题
记忆化搜索以及记忆数组大小的影响
DRZ_2000的博客
01-23
390
记忆化搜索以及记忆数组大小的影响
一 问题的引入
小编在回顾欧拉计划时遇到记忆化搜索问题,略有感触,感觉有必要和大家分享。
话不多说咱们直接上截图:
问题大意:
一个数,若为偶数,则它下一次将变化为n / 2;若为奇数,则将变化为3 * n + 1;这样变化最后一定会以1结尾,为此,我们得到一个转换序列。
现在我们要做的就是在1~1000000之间,找到一个数,该数字对应的转换序列的长度最长。
...
dfs-深度优先搜索之组合的输出
最新发布
02-09
DFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSDFSy以深度优先搜索输出...
DFS-深度优先搜索之八皇后问题
02-09
1.以生动,美丽的代码揭示复杂的八皇后问题,让你们看到dfs的好用,编程的有趣,是多么的美好!!!!! 2.用优雅,简洁的代码,逻辑清晰,明了;让你恍然大悟,”原来是这么简单!!!!!!! ”多一些这种代码,...
DFS-algorithm
05-11
DFS(深度优先搜索)-算法考虑以下情况:有一个城市,名称为A,B,C,D,E,F,G和H 这是城市之间的联系: A连接到B A连接到C B连接到D B连接到E C连接到F C连接到G E连接到H
DFS.rar_the DFS Depth-first
09-20
图的深度搜索算法的C语言实现,平时的上机练习可做参考
python实现深度优先遍历搜索(DFS)算法-源码
10-05
python实现深度优先遍历搜索(DFS)算法_源码
java笔试--数组的dfs问题
软件工程
10-30
341
在针对于二维数组的dfs问题时,优势也可以采用并查集的方法来进行。
相关题目:
463. 岛屿的周长
733. 图像渲染
695. 岛屿的最大面积
1034. 边框着色
数组DFS的思路:
网格问题是这样一类搜索问题:有 m×n 个小方格,组成一个网格,每个小方格与其上下左右四个方格认为是相邻的,要在这样的网格上进行某种搜索。这种题目乍一看可能有点麻烦,实际上非常简单,尤其是用 DFS 的方法。题目没有限制的话,我们尽量用 DFS 来写代码。下面我们一步步地构造出方格类 DFS 的代码。
.
DFS序维护树状数组
qq_52048593的博客
03-27
901
dfs序是指:每个节点在dfs深度优先遍历中的进出栈的时间序列。
如图,当我们维护一个时间戳,即每个节点进栈与出栈的时间,便可以把树上问题转换为区间问题。
例题如下:
当我们需要对树上问题进行区间求和的时候,如果我们可以把树上问题转为区间问题,便可以很方便的利用数组数组以及线段树去维护序列,
#include
#define int long long
using namespace std;
const int N =...
【经典案例】DFS数组遍历
冰雪的专栏
12-11
590
从原点遍历,相邻1的数目,如果被遍历过,则把该点标记为2
package main
// 遍历 1 0 0
// 1 0 0
// 0 0 1
// 从[0, 0]点出发,紧邻的1数目,上面例子为2
func main() {
// 参数2表示,被遍历过,就把1标记为2
print(paintedRepeatedly([][]int{{1,0,0},{1,0,0},{0,0,1}}, 2))
}
func paintedRepeatedly(paint [][]int,.
数组dfs
卷卷萌的博客
08-30
508
给定一个二值图像(二维数组), 判断 p[h_i][w_i] p[h_j][w_j] 是否联通。
class Solution:
def moving(self, matrix, startx, starty, endx, endy):
def dfs(matrix, startx, starty, endx, endy, rows, cols):
...
「DFS算法」实现一个数组,或者字符串的 “全排列” 算法
秋天,黄叶坠地,凉风有信。
04-15
383
一、全排列
给定一个不含重复数字的数组 nums ,返回其 所有可能的全排列 。你可以 按任意顺序 返回答案。
/*
DFS:深度遍历求解
*/
var permute = function(nums) {
let res = []
const dfs = (path)=>{
// 出口条件
if(path.length == nums.length){
//将结果放进数组里
res.push([...path])
深度优先搜索(DFS)的标记数组处理与剪枝技巧
伊一易水寒的博客
12-16
1375
大一小白一枚,坐标南方某不知名一本,正在自学令人头秃的数据结构,目前还在DFS、BFS等巨坑中挣扎(还是太菜了~),希望能分享一下自己在学习”搜索“路上走过的路(坑).
以HD1010 (迷宫里的狗狗)为例:
Problem:
he doggie found a bone in an ancient maze, which fascinated him a lot. However, when h...
用数组记忆竟然可以优化代码
aizim的博客
10-25
112
简介
平时在写代码的时候,有时候看似很简单的代码,但是运行之后,随着数值的增大,电脑的运算能力有限,速度变得极慢,但是由于专业知识不足,无法自己优化代码,只能去网上抄别人已经优化的代码。
现在就教大家如何用数组记忆的方式,优化整个代码的步骤。
例子
菲波纳契数列
以菲波纳契数列为例子,普通代码如下:
int fib(int n)
{
step1++;
if (n <= 1)return n;
return fib(n ...
不同路径 [DFS记忆化数组 & 动态规划]
qq_43164662的博客
09-21
194
DFS作为深度优先遍历,经常碰到需要一节点多次被遍历的情况,导致时间复杂度呈指数级。往往重复遍历目的就不是单词的访问节点了,而是需要该节点到某终点的一种状态(抽象),可用变量记录该节点的状态,将下一次dfs终止在此处,大大降低时间复杂度,这就是记忆化搜索。而记忆化搜索往往和动态规划关联。
一道题弄懂递归、深度优先搜索、记忆化搜索、DP动态规划
little_spice的博客
08-10
2174
参考博客https://blog.csdn.net/weixin_38391092/article/details/79590710
有一个层数为n(n<=1000)的数字三角形。现有一只蚂蚁从顶层开始向下走,每走下一级,可向左下方向或右下方向走。求走到底层后它所经过数字的总和的最大值。
【输入格式】
第一个整数为n,一下n行为各层的数字。
【输出格式】
一个整数,即最大值。
【输入样例 ...
dfs深度优先搜索数组如何建立
09-17
深度优先搜索(DFS)是一种图遍历算法,适用于解决图的连通性、遍历和寻找路径等问题。在应用DFS算法时,常常需要将图的结构表示为数组。
建立一个DFS深度优先搜索数组时,可以按照以下步骤进行操作:
1. 首先,创建一个与图中顶点数量相等的数组,用于记录每个顶点的访问状态。初始时,将所有的数组元素初始化为未访问状态。
2. 然后,选择一个起始顶点,将其标记为已访问,并将该顶点入栈。
3. 从起始顶点开始,循环执行以下步骤:弹出栈顶元素(当前顶点),并输出该顶点的值;
4. 遍历该顶点的所有邻接顶点,若某个邻接顶点未被访问,则将其标记为已访问,并将其入栈。
5. 若当前顶点没有未被访问的邻接顶点,则继续弹出栈顶元素,即回溯到上一个顶点,直到栈为空。
6. 当图中所有顶点都被访问过后,DFS深度优先搜索结束。
通过上述步骤,我们可以将图的结构以数组的形式表示,并使用DFS算法进行遍历。在数组中,每个元素代表一个顶点,其对应的值表示该顶点是否已经被访问。通过设置一个栈来保存待访问的顶点,不断地出栈和入栈的操作,实现了DFS算法的深度遍历特性。
需要注意的是,数组的索引可以用来唯一标识顶点,索引值对应的元素则表示该顶点的访问状态。此外,可以根据具体需求,对数组进行扩展,以记录其他需要的信息,比如顶点的父节点、访问时间等。
“相关推荐”对你有帮助么?
非常没帮助
没帮助
一般
有帮助
非常有帮助
提交
向光.
博客等级
码龄3年
386
原创
168
点赞
303
收藏
96
粉丝
关注
私信
热门文章
大整数类——C++实现
4373
Leetcode.724. 寻找数组的中心下标---前缀和
3918
密码验证功能——C语言
3323
Lintcode.1907 · 数组游戏---贪心+逆向思维
3075
Leetcode.45. 跳跃游戏 II__DP
2619
分类专栏
队列
7篇
字典树Trie(前缀树)
3篇
数学
7篇
BFS
2篇
前缀和
3篇
链表
4篇
springsecurity
2篇
redis
2篇
jwt
2篇
Java学习
9篇
集合
7篇
强大的Stream
1篇
数据结构与算法笔记
5篇
稀疏数组
1篇
图
2篇
并查集
2篇
MySQL
9篇
Leetcode每日刷题
304篇
排序
25篇
DFS与递归及回溯
42篇
树
8篇
字符串处理
21篇
位运算
22篇
线性查找法
12篇
滑动窗口
12篇
哈希思想与哈希映射
55篇
双指针
21篇
栈
22篇
摩尔投票法
3篇
贪心算法
29篇
动态规划
51篇
二分查找法
17篇
蓝桥杯
54篇
编程
7篇
C++ 学习笔记
4篇
最新评论
蓝桥杯:穿越雷区——DFS
ray_zzzzz:
ans为什么初始化为2000
整合springsecurity和springboot及redis,jwt实现前后端分离登录认证图片验证码功能
乂氼哟:
有源码吗?求源码
蓝桥杯试题 A: 跑步训练
此题可解:
flag是啥
2018年蓝桥杯第九届省赛b组第四题--测试次数
YOKE_R:
请问
[code=csharp]
Max=max(1+f2[i-j],1+f1[j-1])
[/code]
这里第一次循环时f2不需要定义吗
第七届蓝桥杯省赛(四平方和)---哈希
Py小郑:
牛逼。思路清晰
您愿意向朋友推荐“博客详情页”吗?
强烈不推荐
不推荐
一般般
推荐
强烈推荐
提交
最新文章
⭐北邮复试刷题2369. 检查数组是否存在有效划分__DP (力扣每日一题)
⭐北邮复试刷题LCR 018. 验证回文串__双指针 (力扣119经典题变种挑战)
⭐北邮复试刷题LCR 052. 递增顺序搜索树__DFS (力扣119经典题变种挑战)
2024年11篇
2023年1篇
2022年75篇
2021年253篇
2020年47篇
目录
目录
分类专栏
队列
7篇
字典树Trie(前缀树)
3篇
数学
7篇
BFS
2篇
前缀和
3篇
链表
4篇
springsecurity
2篇
redis
2篇
jwt
2篇
Java学习
9篇
集合
7篇
强大的Stream
1篇
数据结构与算法笔记
5篇
稀疏数组
1篇
图
2篇
并查集
2篇
MySQL
9篇
Leetcode每日刷题
304篇
排序
25篇
DFS与递归及回溯
42篇
树
8篇
字符串处理
21篇
位运算
22篇
线性查找法
12篇
滑动窗口
12篇
哈希思想与哈希映射
55篇
双指针
21篇
栈
22篇
摩尔投票法
3篇
贪心算法
29篇
动态规划
51篇
二分查找法
17篇
蓝桥杯
54篇
编程
7篇
C++ 学习笔记
4篇
目录
评论
被折叠的 条评论
为什么被折叠?
到【灌水乐园】发言
查看更多评论
添加红包
祝福语
请填写红包祝福语或标题
红包数量
个
红包个数最小为10个
红包总金额
元
红包金额最低5元
余额支付
当前余额3.43元
前往充值 >
需支付:10.00元
取消
确定
下一步
知道了
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝
规则
hope_wisdom 发出的红包
打赏作者
向光.
你的鼓励将是我创作的最大动力
¥1
¥2
¥4
¥6
¥10
¥20
扫码支付:¥1
获取中
扫码支付
您的余额不足,请更换扫码支付或充值
打赏作者
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额
0
抵扣说明:
1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。 2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。
余额充值
DFS 命名空间概述 | Microsoft Learn
DFS 命名空间概述 | Microsoft Learn
跳转至主内容
此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
下载 Microsoft Edge
有关 Internet Explorer 和 Microsoft Edge 的详细信息
目录
退出焦点模式
使用英语阅读
保存
目录
使用英语阅读
保存
打印
Twitter
LinkedIn
Facebook
电子邮件
目录
DFS 命名空间概述
项目
09/03/2023
15 个参与者
反馈
本文内容
适用范围:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012、Windows Server 2008 R2、Windows Server 2008
DFS(分布式文件系统)命名空间是 Windows Server 中的一种角色服务,可用于将不同服务器上的共享文件夹组合到一个或多个逻辑结构的命名空间。 这使用户能够获得共享文件夹的虚拟视图,其中单个路径导致文件位于多个服务器上,如下图所示:
下面是构成 DFS 命名空间的元素的说明:
命名空间服务器 - 命名空间服务器托管命名空间。 命名空间服务器可以是成员服务器或域控制器。
命名空间根路径–命名空间根路径是命名空间的起点。 在上图中,根路径的名称为 Public,命名空间的路径为 \\Contoso\Public。 此类型命名空间是基于域的命名空间,因为它以域名开头(例如 Contoso),并且其元数据存储在 Active Directory 域服务 (AD DS) 中。 尽管上图中显示单个命名空间服务器,但是基于域的命名空间可以存放在多个命名空间服务器上,以提高命名空间的可用性。
文件夹–没有文件夹目标的文件夹将结构和层次结构添加到命名空间,具有文件夹目标的文件夹为用户提供实际内容。 用户浏览命名空间中包含文件夹目标的文件夹时,客户端计算机将收到透明地将客户端计算机重定向到一个文件夹目标的引用。
文件夹目标–文件夹目标是共享文件夹或与命名空间中的某个文件夹关联的另一个命名空间的 UNC 路径。 文件夹目标是存储数据和内容的位置。 在上图中,名为 Tools 的文件夹包含两个文件夹目标,一个位于伦敦,一个位于纽约,名为 Training Guides 的文件夹包含一个文件夹目标,位于纽约。 浏览到 \\Contoso\Public\Software\Tools 的用户透明地重定向到共享文件夹 \\LDN-SVR-01\Tools 或 \\NYC-SVR-01\Tools(取决于用户当前所处的位置)。
本文讨论了 DFS 安装方法、新增功能和查找评估与部署信息的位置。
可以使用 DFS 管理、Windows PowerShell 中的 DFS 命名空间 (DFSN) Cmdlet、DfsUtil 命令或调用 WMI 的脚本来管理命名空间。
服务器要求和限制
运行 DFS 管理或使用 DFS 命名空间没有其他硬件或软件要求。
命名空间服务器是承载命名空间的域控制器或成员服务器。 可以在服务器上承载的命名空间数由命名空间服务器上运行的操作系统决定。
除了单个独立命名空间之外,运行以下操作系统的服务器还可以承载多个基于域的命名空间。
Windows Server 2022
Windows Server 2019
Windows Server 2016
Windows Server 2012 R2
Windows Server 2012
Windows Server 2008 R2 Datacenter 和 Enterprise Edition
Windows Server(半年频道)
运行以下操作系统的服务器可以承载单个独立命名空间:
Windows Server 2008 R2 标准版
下表说明在选择承载命名空间的服务器时要考虑的其他因素。
承载独立命名空间的服务器
承载基于域的命名空间的服务器
必须包含承载命名空间的 NTFS 卷。
必须包含承载命名空间的 NTFS 卷。
可以是成员服务器或域控制器。
必须是配置了命名空间的域中的成员服务器或域控制器。 (此要求适用于承载给定的基于域的命名空间的每个命名空间服务器。)
可以由故障转移群集承载,以提高命名空间的可用性。
命名空间不能是故障转移群集中的群集资源。 但是,如果将命名空间配置为仅使用该服务器上的本地资源,则可以在故障转移群集中充当节点的服务器上找到该命名空间。
安装 DFS 命名空间
DFS 命名空间和 DFS 复制是文件和存储服务角色中的一部分。 DFS 的管理工具(DFS 管理、Windows PowerShell 的 DFS 命名空间模块及命令行工具)分别安装为远程服务器管理工具的一部分。
使用 Windows Admin Center、服务器管理器或 PowerShell 安装 DFS 命名空间,具体如后续部分所述。
使用服务器管理器安装 DFS 的步骤
打开服务器管理器,单击 “管理” ,然后单击 “添加角色和功能” 。 将出现“添加角色和功能向导”。
在 “服务器选择” 页面上,选择你想要在其上安装 DFS 的脱机虚拟机的服务器或虚拟硬盘 (VHD)。
选择要安装的角色服务和功能。
要安装 DFS 命名空间服务,请在“服务器角色”页上选择“DFS 命名空间”。
若只安装 DFS 管理工具,请在 “功能” 页上,展开 “远程服务器管理工具” 、 “角色管理工具” 、 “文件服务工具” ,然后选择 “DFS 管理工具” 。
“DFS 管理工具”安装 DFS 管理管理单元、Windows PowerShell 的 DFS 命名空间模块和命令行工具,但它不在服务器上安装任何 DFS 服务。
使用 Windows PowerShell 安装 DFS 的步骤
使用提升的用户权限打开 Windows PowerShell 会话,然后键入以下命令,其中 是你想要安装的角色服务或功能(请参阅下表以获取一列相关角色服务或功能名称):
Install-WindowsFeature
角色服务或功能
名称
DFS 命名空间
FS-DFS-Namespace
DFS 管理工具
RSAT-DFS-Mgmt-Con
例如,若要安装远程服务器管理工具功能中的分布式文件系统工具部分,请键入:
Install-WindowsFeature "RSAT-DFS-Mgmt-Con"
若要为客户端设备安装分布式文件系统工具部分,请键入:
Add-WindowsCapability -Name Rsat.FileServices.Tools~~~~0.0.1.0 -Online
要安装 DFS 命名空间和远程服务器管理工具功能中的分布式文件系统工具部分,请键入:
Install-WindowsFeature "FS-DFS-Namespace", "RSAT-DFS-Mgmt-Con"
Azure 虚拟机的互操作性
在 Microsoft Azure 中的虚拟机上使用 DFS 命名空间已经过测试。
可在 Azure 虚拟机中托管基于域的命名空间,包括附带 Microsoft Entra ID 的环境。
可以借助使用共享磁盘或超级磁盘的故障转移群集在 Azure 虚拟机中将独立命名空间进行聚类。
要了解如何开始使用 Azure 虚拟机,请参阅 Azure 虚拟机文档。
其他参考
有关其他相关信息,请参阅以下资源。
内容类型
参考
产品评估
Windows Server 中的 DFS 命名空间和 DFS 复制的新增功能
部署
DFS 命名空间可伸缩性注意事项
操作
DFS 命名空间:常见问题
社区资源
文件服务和存储 TechNet 论坛
协议
Windows Server 中的文件服务协议(已弃用)
相关技术
故障转移群集
支持
Windows IT 专业人员支持
其他资源
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
其他资源
本文内容
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
DFSDFS - CC - 单曲 - 网易云音乐
DFSDFS - CC - 单曲 - 网易云音乐
生成外链播放器
DFSDFS
歌手:CC
所属专辑:非
播放
收藏
分享
下载
评论
相似歌曲
GEWFEEWF
CC
IHUCA
CC
QWFASFAS
CC
VOR
CC
网易云音乐多端下载
iPhone
PC
Android
同步歌单,随时畅听好音乐
用户wiki
补充或修改歌曲资料
用户wiki任务中心
音乐开放平台
云村交易所
Amped Studio
X StudioAI歌手
用户认证
音乐交易平台
云推歌
赞赏
服务条款|
隐私政策|
儿童隐私政策|
版权投诉|
投资者关系|
广告合作
|
联系我们
廉正举报
不良信息举报邮箱: 51jubao@service.netease.com
客服热线:95163298
互联网宗教信息服务许可证:浙(2022)0000120
增值电信业务经营许可证:浙B2-20150198
粤B2-20090191-18 工业和信息化部备案管理系统网站
网易公司版权所有©1997-2024杭州乐读科技有限公司运营:浙网文[2021] 1186-054号
浙公网安备 33010802013307号
回到顶部
{if degrade}
手机号登录
注 册
微信登录
QQ登录
微博登录
网易邮箱账号登录
同意
《服务条款》
《隐私政策》
《儿童隐私政策》
{else}
手机号登录
注 册
微信登录
QQ登录
微博登录
网易邮箱账号登录
同意
《服务条款》
《隐私政策》
《儿童隐私政策》
扫码登录
二维码已失效
点击刷新
使用 网易云音乐APP 扫码登录
扫描成功
请在手机上确认登录
选择其他登录模式
{/if}
忘记密码?
短信登录
自动登录
获取验证码
密码登录
自动登录
登 录
< 其他登录方式
没有账号?免费注册 >
自动登录
忘记密码?
登 录
< 其他登录方式
{list suggests as item}
${item|escape}
{/list}
手机号:
密码:
密码不能包含空格
包含字母、数字、符号中至少两种
密码长度为8-20位
下一步
< 返回登录
云音乐将不再支持 腾讯微博 登录方式,请绑定手机号,以免后续无法使用该账号
你的手机号:+
为了安全,我们会给你发送短信验证码
验证码:
< 返回登录
云音乐将不再支持 腾讯微博 登录方式,请绑定手机号,以免后续无法使用该账号
你的手机号:+
为了安全,我们会给你发送短信验证码
输入要解绑的完整手机号,用于验证您的身份
下一步
< 返回登录
跳过 >
获取验证码
获取验证码
取一个昵称,让大家记住你
完成注册,开启云音乐
取一个昵称,让大家记住你
完成注册,开启云音乐
云音乐将不再支持 腾讯微博 登录方式,设置登录密码,以后可以使用手机号登录
你的手机号:+
设置密码后,可以直接用该手机号+密码登录
密码不能包含空格
包含字母、数字、符号中至少两种
密码长度为8-20位
跳过 >
如果你不是机器人输入验证码一定没问题!
账号或密码错误
确 定
取消
+86
{list countries as x}
${x.zh}
+${x.code}
{/list}
由于你在非受信任的设备上登录,需要进行短信验证()
通过短信验证身份
{list data as x}${x.t}{/list}
歌单名:
错误提示
可通过“收藏”将音乐添加到新歌单中
新 建
取 消
评论共0条评论
◆◆
后面还有0条评论,查看更多>
收起
评论 ()
{list beg..end as y}
{var x=xlist[y]}
{if !!x}
${escape(x.user.nickname)}
{if x.user.avatarDetail && x.user.avatarDetail.identityIconUrl}
{/if}
{if x.user.vipRights}
{if x.user.vipRights.redplus && x.user.vipRights.redplus.vipCode === 300 && x.user.vipRights.redplus.rights && x.user.vipRights.redplus.iconUrl}
{elseif x.user.vipRights.associator && x.user.vipRights.associator.rights && x.user.vipRights.redVipLevel}
{if x.user.vipRights.associator.iconUrl}
{elseif x.user.vipRights.redVipLevel == 1}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 2}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 3}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 4}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 5}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 6}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.redVipLevel == 7}
{if useNewVipIcon}
{else}
{/if}
{/if}
{elseif x.user.vipRights.musicPackage && x.user.vipRights.musicPackage.rights}
{if x.user.vipRights.musicPackage.iconUrl}
{else}
{/if}
{elseif x.user.vipRights.redVipAnnualCount >= 1}
{if useNewVipIcon}
{else}
{/if}
{elseif x.user.vipRights.associator && x.user.vipRights.associator.rights}
{if useNewVipIcon}
{else}
{/if}
{/if}
{/if}
{if !!x.beRepliedUser}
回复 ${escape(x.beRepliedUser.nickname)}
${getAuthIcon(x.beRepliedUser)}
{if x.beRepliedUser.vipRights}
{if x.beRepliedUser.vipRights.redplus && x.beRepliedUser.vipRights.redplus.vipCode === 300 && x.beRepliedUser.vipRights.redplus.rights && x.beRepliedUser.vipRights.redplus.iconUrl}
{elseif x.beRepliedUser.vipRights.associator && x.beRepliedUser.vipRights.associator.rights}
{if x.beRepliedUser.vipRights.redVipAnnualCount >= 1}
{if useNewVipIcon}
{else}
{/if}
{elseif x.beRepliedUser.vipRights.associator.iconUrl}
{else}
{if useNewVipIcon}
{else}
{/if}
{/if}
{elseif x.beRepliedUser.vipRights.musicPackage && x.beRepliedUser.vipRights.musicPackage.rights}
{if x.beRepliedUser.vipRights.musicPackage.iconUrl}
{else}
{/if}
{/if}
{/if}
{/if}
:${getRichText(escape(x.content),'s-fc7')}
{if !!x.expressionUrl}
{/if}
{if x.beReplied&&x.beReplied.length}
{var replied = x.beReplied[0]}
◆◆
{if (replied && replied.status>=0) && (replied.content || replied.expressionUrl)}
${replied.user.nickname}${getAuthIcon(replied.user)}
{if replied.user.vipRights}
{if replied.user.vipRights.redplus && replied.user.vipRights.redplus.vipCode === 300 && replied.user.vipRights.redplus.rights && replied.user.vipRights.redplus.iconUrl}
{elseif replied.user.vipRights.associator && replied.user.vipRights.associator.rights}
{if replied.user.vipRights.redVipAnnualCount >= 1}
{if useNewVipIcon}
{else}
{/if}
{elseif replied.user.vipRights.associator.iconUrl}
{else}
{if useNewVipIcon}
{else}
{/if}
{/if}
{elseif replied.user.vipRights.musicPackage && replied.user.vipRights.musicPackage.rights}
{if replied.user.vipRights.musicPackage.iconUrl}
{else}
{/if}
{/if}
{/if}
:${getRichText(escape(replied.content),'s-fc7')}
{if !!replied.expressionUrl}
{/if}
{else}
该评论已删除
{/if}
{/if}
${timeformat(x.time)}
{if x.topCommentId}音乐人置顶{/if}
{if canTop()&&GUser&&GUser.userId&&(GUser.userId==x.user.userId)}
{if x.topCommentId}解除置顶{else}置顶评论{/if}|
{/if}
{if GUser&&GUser.userId&&(GUser.userId==x.user.userId||GUser.userId==resUserId)}
删除|
{else}
删除|
{/if}
{if GAllowRejectComment}
{if hot||!x.isRemoveHotComment}
移除精彩评论|
{else}
已移除精彩评论|
{/if}
{/if}
{if !x.topCommentId}{if x.likedCount} (${getPlayCount(x.likedCount)}){/if}
|{/if}
回复
{/if}
{/list}
{list beg..end as y}
{var x=xlist[y]}
${escape(x.user.nickname)}
{if x.user.avatarDetail && x.user.avatarDetail.identityIconUrl}
{/if}
{if x.user.vipRights}
{if x.user.vipRights.redplus && x.user.vipRights.redplus.vipCode === 300 && x.user.vipRights.redplus.rights && x.user.vipRights.redplus.iconUrl}
{elseif x.user.vipRights.associator && x.user.vipRights.associator.rights}
{if x.user.vipRights.associator.iconUrl}
{elseif x.user.vipRights.redVipLevel == 1}
{elseif x.user.vipRights.redVipLevel == 2}
{elseif x.user.vipRights.redVipLevel == 3}
{elseif x.user.vipRights.redVipLevel == 4}
{elseif x.user.vipRights.redVipLevel == 5}
{elseif x.user.vipRights.redVipLevel == 6}
{elseif x.user.vipRights.redVipLevel == 7}
{/if}
{elseif x.user.vipRights.musicPackage && x.user.vipRights.musicPackage.rights}
{if x.user.vipRights.musicPackage.iconUrl}
{else}
{/if}
{/if}
{/if}
{if !!x.beRepliedUser}
回复 ${escape(x.beRepliedUser.nickname)}
${getAuthIcon(x.beRepliedUser)}
{if x.beRepliedUser.vipRights}
{if x.beRepliedUser.vipRights.redplus && x.beRepliedUser.vipRights.redplus.vipCode === 300 && x.beRepliedUser.vipRights.redplus.rights && x.beRepliedUser.vipRights.redplus.iconUrl}
{elseif x.beRepliedUser.vipRights.associator && x.beRepliedUser.vipRights.associator.rights}
{if x.beRepliedUser.vipRights.redVipAnnualCount >= 1}
{elseif x.beRepliedUser.vipRights.associator.iconUrl}
{else}
{/if}
{elseif x.beRepliedUser.vipRights.musicPackage && x.beRepliedUser.vipRights.musicPackage.rights}
{if x.beRepliedUser.vipRights.musicPackage.iconUrl}
{else}
{/if}
{/if}
{/if}
{/if}
:${getRichText(escape(x.content),'s-fc7')}
{if !!x.expressionUrl}
{/if}
{if x.beReplied&&x.beReplied.length}
{var replied = x.beReplied[0]}
◆◆
{if replied&&replied.content}
${replied.user.nickname}${getAuthIcon(replied.user)}
{if replied.user.vipRights}
{if replied.user.vipRights.redplus && replied.user.vipRights.redplus.vipCode === 300 && replied.user.vipRights.redplus.rights && replied.user.vipRights.redplus.iconUrl}
{elseif replied.user.vipRights.associator && replied.user.vipRights.associator.rights}
{if replied.user.vipRights.redVipAnnualCount >= 1}
{elseif replied.user.vipRights.associator.iconUrl}
{else}
{/if}
{elseif replied.user.vipRights.musicPackage && replied.user.vipRights.musicPackage.rights}
{if replied.user.vipRights.musicPackage.iconUrl}
{else}
{/if}
{/if}
{/if}
:${getRichText(escape(replied.content),'s-fc7')}
{else}
该评论已删除
{/if}
{/if}
${timeformat(x.time)}
{if GUser&&GUser.userId&&(GUser.userId==x.user.userId||GUser.userId==resUserId)}
删除|
{else}
删除|
{/if}
{if x.likedCount} (${getPlayCount(x.likedCount)}){/if}
|
回复
{/list}
评论
110/120
◆◆
◆◆
回复
110/120
回复
110/120
发送110/120
评论
110/120
发送
110/120
新歌单
加载中...
{list beg..end as y}
{var x=xlist[y]}
{if x.highQuality}{/if}
${escape(cutStr(x.name,40))}
${x.trackCount}首
{if x.trackCount+size>10000}歌单已满{/if}
{/list}
说点什么
140
转发
取消
歌曲同步完成
查看我的音乐
{if suggests.length == 0}
轻敲空格完成输入
{else}
选择最近@的人或直接输入
{/if}
{list suggests as suggest}
${suggest.nickname}
{/list}
{if receiver}
${receiver.nickname}×
{/if}
选择或输入好友昵称
{list users as user}
${user.nickname}
{/list}
{list users as user}
${user.nickname}
{/list}
分享给大家
私信分享
最多选择10位好友
140/140
分享
取消
同时分享到:
{macro listArtists(artists)}
{list artists as art}
${art.name|mark}
{/list}
{/macro}
搜“${keyword|cutStr}” 相关用户 >
{list result.order as index}
{var lst=result[index]}
{if !!lst&&!!lst.length}
{if index=="songs"}
单曲
{list lst as song}
${song.name|mark}-${listArtists(song.artists)}
{/list}
{elseif index=="artists"}
歌手
{list lst as artist}
${artist.name|mark}
{/list}
{elseif index=="albums"}
专辑
{list lst as album}
${album.name|mark}{if album.artist}-${album.artist.name|mark}{/if}
{/list}
{elseif index=="playlists"}
歌单
{list lst as playlist}
${playlist.name|mark}
{/list}
{elseif index=="mvs"}
视频
{list lst as mv}
MV:${mv.name|mark}{if mv.artistName}-${mv.artistName|mark}{/if}
{/list}
{/if}
{/if}
{/list}
${info|escape}
{if canChange}{/if}
${title}
{if !fail}
{else}
${fail}
{/if}
{if !fail}
{else}
${fail}
{/if}
知道了
上传节目
删除
取消
服务条款和隐私政策更新
服务条款
同意
{list buttons as item}
${item.text}
{/list}
微信
易信
QQ空间
LOFTER
message
知道了
新浪微博
腾讯微博
豆瓣
140
分享
取消
${tip}
${oktext}
${cctext}
${tip}
${oktext}
{if showSongText}${songTxt}{/if}
${tip}
{if typeof(oktext) != 'undefined'}${oktext}{/if}
{if typeof(cctext) != 'undefined'}${cctext}{/if}
${tip}
{if typeof(oktext) != 'undefined'}${oktext}{/if}
{if typeof(cctext) != 'undefined'}${cctext}{/if}
该资源为公益歌曲
捐赠任意金额(2~4999元)即可无限畅听下载
新浪微博
微信
易信好友
QQ空间
LOFTER
豆瓣
悬赏1积分让大家来帮你补歌词,是否继续?
若30天内歌词未补充,积分将退还给您
继续求
取消
原手机号已停用
(使用其他方式验证)
原手机号仍能使用
(使用手机验证码验证)
{if hasWx}
点击使用微信验证
{/if}
{if hasQQ}
点击使用QQ验证
{/if}
请填写以下安全问题的答案
问题:
回答:
账号或密码错误
上一步
下一步
-请选择-
deepin15(64位)
ubuntu18.04(64位)
您的系统为Windows 10,推荐下载UWP版
下载UWP版本
继续下载PC版本
{list options as o}
${o|filter}
{/list}
使用云音乐客户端
即可无限下载高品质音乐
Mac版V1.9.1
PC版V1.9.1
已安装PC版
扫描下载手机版
该资源为付费内容,扫描下方二维码,使用最新的安卓或iPhone版本购买后即可畅享
{var title=""}
{if artists && artists.length}
{list artists as x}
{if x}
{var title = title + x.name}
{if x_index < x_length - 1}
{var title = title + " / "}
{/if}
{/if}
{/list}
{/if}
${escape(title)}
{if artists && artists.length}
{list artists as x}
{if !!x}
{if !!x.id}
${mark(escape(x.name))}
{else}
${mark(escape(x.name))}
{/if}
{if x_index < x_length - 1} / {/if}
{/if}
{/list}
{/if}
${comJST('com-mv-artists', artists, clazz, mark, boxClazz)}
{if x.userType==4}${before}${after}{elseif x.authStatus==1}${before}${after}{elseif (x.expertTags && x.expertTags.length>0) || !isEmptyObject(x.experts)}${before}${after}{/if}
{if loginUserProfile.avatarDetail&&loginUserProfile.avatarDetail.identityIconUrl}
{/if}
{if x.avatarDetail && x.avatarDetail.identityIconUrl}
{/if}
1/2
{list plist as item}
{/list}
{list beg..end as y}
{var x=xlist[y]}
${y+1}
{if type=='rank'}
{if x.lastRank>=0}
{if y-x.lastRank>0}
${y-x.lastRank}
{elseif y-x.lastRank==0}
0
{else}
${x.lastRank-y}
{/if}
{else}
{/if}
{/if}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
${dur2time(x.duration/1000)}{if x.ftype==2}{/if}
分享
{if canDel}
删除
{/if}
${getArtistName(x.artists, '', '', false, false, true)}
{if type=='dayRcmd'}
{if x.album}${x.album.name}{/if}
不感兴趣
{else}
{if x.album}
${soil(x.album.name)}
{/if}
{/if}
{/list}
歌曲标题
时长
歌手
{list beg..end as y}
{var x=xlist[y]}
${y+1}
{if type=='rank'}
{if x.lastRank>=0}
{if y-x.lastRank>0}
${y-x.lastRank}
{elseif y-x.lastRank==0}
0
{else}
${x.lastRank-y}
{/if}
{else}
{/if}
{/if}
{if x.privilege.fee == 1}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
{else}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
{/if}
${dur2time(x.duration/1000)}{if x.ftype==2}{/if}
分享
{if canDel}
删除
{/if}
${getArtistName(x.artists, '', '/', false, true, true)}
{/list}
{list beg..end as y}
{var x=xlist[y]}
${y+1}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
${dur2time(x.duration/1000)}{if x.ftype==2}{/if}
分享
{if canDel}
删除
{/if}
{if x.album}
{var transName = x.album.tns && x.album.tns.length > 0 ? x.album.tns[0] : ''}
${soil(x.album.name)}
{if transName}
- (${transName|escape})
{/if}
{/if}
{/list}
标题
时长
歌手
{list beg..end as y}
{var x=xlist[y]}
{if y<3}
${y+1}
{if x.lastRank>=0}
{if y-x.lastRank>0}
${y-x.lastRank}
{elseif y-x.lastRank==0}
0
{else}
${x.lastRank-y}
{/if}
{else}
{/if}
{if x.album}{/if}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
{else}
${y+1}
{if x.lastRank>=0}
{if y-x.lastRank>0}
${y-x.lastRank}
{elseif y-x.lastRank==0}
0
{else}
${x.lastRank-y}
{/if}
{else}
{/if}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
{/if}
${dur2time(x.duration/1000)}{if x.ftype==2}{/if}
分享
{if canDel}
删除
{/if}
${getArtistName(x.artists, '', '', false, false, true)}
{/list}
{list beg..end as y}
{var x=xlist[y]}
${y+1}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
${dur2time(x.duration/1000)}{if x.ftype==2}{/if}
分享
{if canDel}
删除
{/if}
${getArtistName(x.artists, '', '', false, false, true)}
{if x.album}
${soil(x.album.name)}
{/if}
{/list}
{list beg..end as y}
{var x=xlist[y]}
{if extData&&extData.limit&&y>=extData.limit}
{break}
{/if}
{var from=getFrom()}
${y+1}.
${x.name}
-
${getArtistName(x.artists, 's-fc8')}
分享
下载
{if extData.showCount&&x.playCount}${x.playCount}次{/if}
{/list}
{if extData&&extData.limit&&xlist.length>extData.limit}
查看更多>
{/if}
{list beg..end as y}
{var x=xlist[y]}
${y+1}
{if type=='rank'}
{if x.lastRank>=0}
{if y-x.lastRank>0}
${y-x.lastRank}
{elseif y-x.lastRank==0}
0
{else}
${x.lastRank-y}
{/if}
{else}
{/if}
{/if}
{var alia=songAlia(x)}
${soil(x.name)}{if alia} - (${soil(alia)}){/if}
{if x.mvid>0}
MV
{/if}
分享
{if canDel}
删除
{/if}
${getArtistName(x.artists, '', '', false, false, true)}
{if x.album}
${soil(x.album.name)}
{/if}
${formatTime(x.paidTime)}
{/list}
最多选择10位好友
发 给:
内 容:
{if nolyric}
纯音乐,无歌词
{if thirdCopy}
${copyFrom}
{/if}
{elseif !lines.length}
暂时没有歌词 求歌词
{if thirdCopy}
${copyFrom}
{/if}
{else}
{list lines as l}
{if lines.length >limit && l_index==limit}
{/if}
${l.lyric}
{if lines.length > limit && l_index==lines.length-1}
展开
{/if}
{/list}
{/if}
{if !nolyric}
{if sgc}
上传歌词
{/if}
{if lrc&&lrc.lyric&&sfy}
翻译歌词
{/if}
{/if}
{if !(lrc&&lrc.lyric)}歌曲{/if}报错
{if !nolyric}
{if lyricUser&&lyricUser.userid}
贡献滚动歌词:${lyricUser.nickname}
{/if}
{if lyricUser&&lyricUser.userid==0}
贡献滚动歌词:${lyricUser.nickname}
{/if}
{if transUser&&transUser.userid}
贡献翻译:${transUser.nickname}
{/if}
{if transUser&&transUser.userid==0}
贡献翻译:${transUser.nickname}
{/if}
{if lrc&&lrc.lyric&&qfy}
暂时没有翻译,求翻译
{/if}
{/if}
{if degrade}
手机号登录
注 册
微信登录
QQ登录
微博登录
网易邮箱账号登录
同意
《服务条款》
《隐私政策》
《儿童隐私政策》
{else}
手机号登录
注 册
微信登录
QQ登录
微博登录
网易邮箱账号登录
同意
《服务条款》
《隐私政策》
《儿童隐私政策》
扫码登录
二维码已失效
点击刷新
使用 网易云音乐APP 扫码登录
扫描成功
请在手机上确认登录
选择其他登录模式
{/if}
忘记密码?
短信登录
自动登录
获取验证码
密码登录
自动登录
登 录
< 其他登录方式
没有账号?免费注册 >
自动登录
忘记密码?
登 录
< 其他登录方式
{list suggests as item}
${item|escape}
{/list}
手机号:
密码:
密码不能包含空格
包含字母、数字、符号中至少两种
密码长度为8-20位
下一步
< 返回登录
云音乐将不再支持 腾讯微博 登录方式,请绑定手机号,以免后续无法使用该账号
你的手机号:+
为了安全,我们会给你发送短信验证码
验证码:
< 返回登录
云音乐将不再支持 腾讯微博 登录方式,请绑定手机号,以免后续无法使用该账号
你的手机号:+
为了安全,我们会给你发送短信验证码
输入要解绑的完整手机号,用于验证您的身份
下一步
< 返回登录
跳过 >
获取验证码
获取验证码
取一个昵称,让大家记住你
完成注册,开启云音乐
取一个昵称,让大家记住你
完成注册,开启云音乐
云音乐将不再支持 腾讯微博 登录方式,设置登录密码,以后可以使用手机号登录
你的手机号:+
设置密码后,可以直接用该手机号+密码登录
密码不能包含空格
包含字母、数字、符号中至少两种
密码长度为8-20位
跳过 >
如果你不是机器人输入验证码一定没问题!
账号或密码错误
确 定
取消
+86
{list countries as x}
${x.zh}
+${x.code}
{/list}
由于你在非受信任的设备上登录,需要进行短信验证()
通过短信验证身份
Graph Traversal (Depth/Breadth First Search) - VisuAlgo
Graph Traversal (Depth/Breadth First Search) - VisuAlgo
7
VisuAlgo.net
/
en
zh
id
/dfsbfs
Graph Traversal (DFS/BFS)
Exploration Mode ▿
e-Lecture Mode
Login
Profile
Training
Tests
Log Out
-7
+7
1x
1. DFS & BFS
2. Visualization
3. Specifying an Input Graph
4. Recap
4-1. Binary Tree Traversal - Source = Root
4-2. Binary Tree Traversal - Pre-/In-/Post-order
4-3. The Answer
4-4. Binary Tree Traversal - Acyclic
4-5. Issues in General Graph
5. DFS
5-1. Analogy
5-2. Trying All Options
5-3. Avoiding Cycle
5-4. Memorizing the Path
5-5. Hands-on Example
5-6. O(V+E) Time Complexity
5-7. O(V+E) at all times?
5-8. The Answer
6. BFS
6-1. Analogy
6-2. Try All, Avoid Cycle, Memorize Path
6-3. Hands-on Example
6-4. O(V+E) Time Complexity
7. Simple DFS/BFS Applications
7-1. Reachability Test
7-2. Print the Traversal Path
7-3. Identifying a Connected Component (CC)
7-4. Counting the Number of/Labeling the CCs
7-5. Wait, What is the Time Complexity?
7-6. The Answer
7-7. Detecting Cycle - Part 1
7-8. Detecting Cycle - Part 2
7-9. Hands-on Example (Detailed)
7-10. Topological Sort - Definition
7-11. Topological Sort
8. More Advanced DFS/BFS Applications
9. Bipartite Graph Checker
10. Find Cut Vertices & Bridges
11. Find Strongly Connected Components
12. 2-SAT Checker Algorithm
13. Which One is Better?
13-1. The Answer
14. Extras
14-1. Online Quiz
14-2. Online Judge Exercises
14-3. Discussion
✍
✘
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: Topological Sort algorithm (both DFS and BFS/Kahn's algorithm version),Bipartite Graph Checker algorithm (both DFS and BFS version),Cut Vertex & Bridge finding algorithm,Strongly Connected Components (SCC) finding algorithms(both Kosaraju's and Tarjan's version), and2-SAT Checker algorithm.
Remarks: By default, we show e-Lecture Mode for first time (or non logged-in) visitor.
If you are an NUS student and a repeat visitor, please login.
→
When the chosen graph traversal algorithm is running, the animation will be shown here.We use vertex+edge color (the color scheme will be elaborated soon) and occasionally the extra text under the vertex (in red font) to highlight the changes.All graph traversal algorithms work on directed graphs (this is the default setting, where each edge has an arrowtip to indicate its direction) but the Bipartite Graph Check algorithm and the Cut Vertex & Bridge finding algorithm requires the undirected graphs (the conversion is done automatically by this visualization).
Pro-tip 1: Since you are not logged-in, you may be a first time visitor (or not an NUS student) who are not aware of the following keyboard shortcuts to navigate this e-Lecture mode: [PageDown]/[PageUp] to go to the next/previous slide, respectively, (and if the drop-down box is highlighted, you can also use [→ or ↓/← or ↑] to do the same),and [Esc] to toggle between this e-Lecture mode and exploration mode.
←
→
There are two different sources for specifying an input graph:Edit Graph: You can draw a new graph or edit an example unweighted directed graph as the input graph (to draw bidirectional edge (u, v), you can draw two directed edges u → v and v → u).Example Graphs: You can select from the list of our selected example graphs to get you started.
Pro-tip 2: We designed this visualization and this e-Lecture mode to look good on 1366x768 resolution or larger (typical modern laptop resolution in 2021). 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.
←
→
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? Pre = 0, 2, 4, 3, 1 Post = 4, 3, 2, 1, 0 In = 1, 0, 3, 2, 4 Post = 1, 3, 4, 2, 0 Pre = 0, 1, 2, 3, 4 In = 4, 2, 3, 0, 1Submit
Pro-tip 3: Other than using the typical media UI at the bottom of the page, you can also control the animation playback using keyboard shortcuts (in Exploration Mode): Spacebar to play/pause/replay the animation, ←/→ to step the animation backwards/forwards, respectively, and -/+ to decrease/increase the animation speed, respectively.
←
→
We normally start from the most important vertex of a (binary) tree: The root vertex.If the given tree is not 'rooted' (see the example picture), we can pick any one vertex (for example, vertex 0 in the example picture) and designate it as the root. If we imagine that all edges are strings of similar length, then after "virtually pulling the designated root upwards" and let gravity pulls the rest downwards, we have a rooted directed (downwards) tree — see the next slide.PS: Technically, this transformation is done by running DFS(0) that we will explore soon.
←
→
In a binary tree, we only have up to two neighboring choices: From the current vertex, we can go to the left subtree first or go to the right subtree first. We also have option to visit the current vertex before or after visiting one of the (or both) subtree(s).This gives rise to the classics: pre-order (visit current vertex, visit its left subtree, visit its right subtree), in-order (left, current, right), and post-order (left, right, current) traversals.Discussion: Do you notice that there are three other possible binary tree traversal combinations? What are they?
←
→
The content of this interesting slide (the answer of the usually intriguing discussion point from the earlier slide) is hidden and only available for legitimate CS lecturer worldwide. This mechanism is used in the various flipped classrooms in NUS.
If you are really a CS lecturer (or an IT teacher) (outside of NUS) and are interested to know the answers, please drop an email to stevenhalim at gmail dot com (show your University staff profile/relevant proof to Steven) for Steven to manually activate this CS lecturer-only feature for you.
FAQ: This feature will NOT be given to anyone else who is not a CS lecturer.
←
→
In a binary tree, or in a tree structure in general, there is no (non-trivial) cycle involving 3 or more distinct vertices to worry about (we do not consider the trivial cycle involving bi-directional edges which can be taken care of easily — see three slides earlier).
←
→
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.
←
→
One of the most basic graph traversal algorithm is the O(V+E) Depth-First Search (DFS).DFS takes one input parameter: The source vertex s.DFS is one of the most fundamental graph algorithm, so please spend time to understand the key steps of this algorithm.
←
→
The 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.
←
→
As it name implies, DFS starts from a distinguished source vertex s and uses recursion (an implicit stack) to order the visitation sequence as deep as possible before backtracking.If DFS is at a vertex u and it has X neighbors, it will pick the first neighbor V1 (usually the vertex with the lowest vertex number), recursively explore all reachable vertices from vertex V1, and eventually backtrack to vertex u. DFS will then do the same for the other neighbors until it finishes exploring the last neighbor VX and its reachable vertices.This wordy explanation will be clearer with DFS animation later.
←
→
If the graph is cyclic, the previous 'try-all' strategy may lead DFS to run in cycle.So the basic form of DFS uses an array status[u] of size V vertices to decide between binary conditions: Whether vertex u has been visited or unvisited. Only if vertex u is still unvisited, then DFS can visit vertex u.When DFS runs out of option, it backtrack to previous vertex (p[u], see the next slide) as the recursion unwinds.
←
→
DFS uses another array p[u] of size V vertices to remember the parent/predecessor/previous of each vertex u along the DFS traversal path.The predecessor of the source vertex, i.e., p[s] is set to -1 to say that the source vertex has no predecessor (as the lowest vertex number is vertex 0).The sequence of vertices from a vertex u that is reachable from the source vertex s back to s forms the DFS spanning tree. We color these tree edges with red color.
←
→
For now, ignore the extra status[u] = explored in the displayed pseudocode and the presence of blue and grey edges in the visualization (to be explained soon).Without further ado, let's execute DFS(0) on the default example graph for this e-Lecture (CP3 Figure 4.1). Recap DFS ExampleThe basic version of DFS presented so far is already enough for most simple cases.
←
→
The time complexity of DFS is O(V+E) because:Each vertex is only visited once due to the fact that DFS will only recursively explore a vertex u if status[u] = unvisited — O(V)Every time a vertex is visited, all its k neighbors are explored and therefore after all vertices are visited, we have examined all E edges — (O(E) as the total number of neighbors of each vertex equals to E).
←
→
The O(V+E) time complexity of DFS only achievable if we can visit all k neighboring vertices of a vertex in O(k) time.Quiz: Which underlying graph data structure support that operation? Adjacency Matrix Edge List Adjacency ListSubmit Discussion: Why?
←
→
The content of this interesting slide (the answer of the usually intriguing discussion point from the earlier slide) is hidden and only available for legitimate CS lecturer worldwide. This mechanism is used in the various flipped classrooms in NUS.
If you are really a CS lecturer (or an IT teacher) (outside of NUS) and are interested to know the answers, please drop an email to stevenhalim at gmail dot com (show your University staff profile/relevant proof to Steven) for Steven to manually activate this CS lecturer-only feature for you.
FAQ: This feature will NOT be given to anyone else who is not a CS lecturer.
←
→
Another basic graph traversal algorithm is the O(V+E) Breadth-First Search (BFS).As with DFS, BFS also takes one input parameter: The source vertex s.Both DFS and BFS have their own strengths and weaknesses. It is important to learn both and apply the correct graph traversal algorithm for the correct situation.
←
→
Imagine a still body of water and then you throw a stone into it. The first location where the stone hits the water surface is the position of the source vertex and the subsequent ripple effect across the water surface is like the BFS traversal pattern.
←
→
BFS is very similar with DFS that have been discussed earlier, but with some differences.BFS starts from a source vertex s but it uses a queue to order the visitation sequence as breadth as possible before going deeper.BFS also uses a Boolean array of size V vertices to distinguish between two states: visited and unvisited vertices (we will not use BFS to detect back edge(s) as with DFS).In this visualization, we also show that starting from the same source vertex s in an unweighted graph, BFS spanning tree of the graph equals to its SSSP spanning tree.
←
→
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?
←
→
The time complexity of BFS is O(V+E) because:Each vertex is only visited once as it can only enter the queue once — O(V)Every time a vertex is dequeued from the queue, all its k neighbors are explored and therefore after all vertices are visited, we have examined all E edges — (O(E) as the total number of neighbors of each vertex equals to E).As with DFS, this O(V+E) time complexity is only possible if we use Adjacency List graph data structure — same reason as with DFS analysis.
←
→
So far, we can use DFS/BFS to solve a few graph traversal problem variants:Reachability test,Actually printing the traversal path,Identifying/Counting/Labeling Connected Components (CCs) of undirected graphs,Detecting if a graph is cyclic,Topological Sort (only on DAGs),For most data structures and algorithms courses, the applications of DFS/BFS are up to these few basic ones only, although DFS/BFS can do much more...
←
→
If you are asked to test whether a vertex s and a (different) vertex t in a graph are reachable, i.e., connected directly (via a direct edge) or indirectly (via a simple, non cyclic, path), you can call the O(V+E) DFS(s) (or BFS(s)) and check if status[t] = visited.Example 1: s = 0 and t = 4, run DFS(0) and notice that status[4] = visited.Example 2: s = 0 and t = 7, run DFS(0) and notice that status[7] = unvisited.
←
→
Remember that we set p[v] = u every time we manage to extend DFS/BFS traversal from vertex u to vertex v — a tree edge in the DFS/BFS spanning tree. Thus, we can use following simple recursive function to print out the path stored in array p. Possible follow-up discussion: Can you write this in iterative form? (trivial)method backtrack(u) if (u == -1) stop backtrack(p[u]); output vertex uTo print out the path from a source vertex s to a target vertex t in a graph, you can call O(V+E) DFS(s) (or BFS(s)) and then O(V) backtrack(t). Example: s = 0 and t = 4, you can call DFS(0) and then backtrack(4). Elaborate
←
→
We can enumerate all vertices that are reachable from a vertex s in an undirected graph (as the example graph shown above) by simply calling O(V+E) DFS(s) (or BFS(s)) and enumerate all vertex v that has status[v] = visited.Example: s = 0, run DFS(0) and notice that status[{0,1,2,3,4}] = visited so they are all reachable vertices from vertex 0, i.e., they form one Connected Component (CC).
←
→
We can use the following pseudo-code to count the number of CCs:CC = 0for all u in V, set status[u] = unvisitedfor all u in V if (status[u] == unvisited) ++CC // we can use CC counter number as the CC label DFS(u) // or BFS(u), that will flag its members as visitedoutput CC // the answer is 3 for the example graph above, i.e.// CC 0 = {0,1,2,3,4}, CC 1 = {5}, CC 2 = {6,7,8}You can modify the DFS(u)/BFS(u) code a bit if you want to use it to label each CC with the identifier of that CC.
←
→
Quiz: What is the time complexity of Counting the Number of CCs algorithm? Calling O(V+E) DFS/BFS V times, so O(V*(V+E)) = O(V^2 + VE) Trick question, the answer is none of the above, it is O(_____) It is still O(V+E)Submit Discussion: Why?
←
→
The content of this interesting slide (the answer of the usually intriguing discussion point from the earlier slide) is hidden and only available for legitimate CS lecturer worldwide. This mechanism is used in the various flipped classrooms in NUS.
If you are really a CS lecturer (or an IT teacher) (outside of NUS) and are interested to know the answers, please drop an email to stevenhalim at gmail dot com (show your University staff profile/relevant proof to Steven) for Steven to manually activate this CS lecturer-only feature for you.
FAQ: This feature will NOT be given to anyone else who is not a CS lecturer.
←
→
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.
←
→
Back edge can be detected by modifying array status[u] to record three different states:unvisited: same as earlier, DFS has not reach vertex u before,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),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).
←
→
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 (as vertex 2 is `explored' to vertex 1 which is currently `explored') (similarly with Edge 6 → 4 as part of cycle 4 → 5 → 7 → 6 → 4).Note that if edges 2 → 1 and 6 → 4 are reversed to 1 → 2 and 4 → 6, then the graph is correctly classified as acyclic as edge 3 → 2 and 4 → 6 go from `explored' to `fully visited'. If we only use binary states: `unvisited' vs `visited', we cannot distinguish these two cases.
←
→
There is another DFS (and also BFS) application that can be treated as 'simple': Performing Topological Sort(ing) of a Directed Acyclic Graph (DAG) — see example above.Topological sort of a DAG is a linear ordering of the DAG's vertices in which each vertex comes before all vertices to which it has outbound edges.Every DAG (can be checked with DFS earlier) has at least one but possibly more topological sorts/ordering.One of the main purpose of (at least one) topological sort of a DAG is for Dynamic Programming (DP) technique. For example, this topological sorting process is used internally in DP solution for SSSP on DAG.
←
→
We can use either the O(V+E) DFS or BFS to perform Topological Sort of a Directed Acyclic Graph (DAG).The DFS version requires just one additional line compared to the normal DFS and is basically the post-order traversal of the graph. Try Toposort (DFS) on the example DAG.The BFS version is based on the idea of vertices without incoming edge and is also called as Kahn's algorithm. Try Toposort (BFS/Kahn's) on the example DAG.
←
→
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:Bipartite Graph Checker (DFS and BFS variants),Finding Articulation Points (Cut Vertices) and Bridges of an Undirected Graph (DFS only),Finding Strongly Connected Components (SCCs) of a Directed Graph (Tarjan's and Kosaraju's algorithms), and2-SAT(isfiability) Checker algorithms.Advertisement: The details are written in Competitive Programming book.
←
→
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.
←
→
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.
←
→
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.
←
→
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.
←
→
Quiz: Which Graph Traversal Algorithm is Better? It Depends on the Situation Both are Equally Good Always DFS Always BFSSubmit Discussion: Why?
←
→
The content of this interesting slide (the answer of the usually intriguing discussion point from the earlier slide) is hidden and only available for legitimate CS lecturer worldwide. This mechanism is used in the various flipped classrooms in NUS.
If you are really a CS lecturer (or an IT teacher) (outside of NUS) and are interested to know the answers, please drop an email to stevenhalim at gmail dot com (show your University staff profile/relevant proof to Steven) for Steven to manually activate this CS lecturer-only feature for you.
FAQ: This feature will NOT be given to anyone else who is not a CS lecturer.
←
→
There are lots of things that we can still do with just DFS and/or BFS...
←
→
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.
←
→
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:dfs_cc.cpp/bfs.cppdfs_cc.java/bfs.javadfs_cc.py/bfs.pydfs_cc.ml/bfs.ml
←
→
The content of this interesting slide (the answer of the usually intriguing discussion point from the earlier slide) is hidden and only available for legitimate CS lecturer worldwide. This mechanism is used in the various flipped classrooms in NUS.
If you are really a CS lecturer (or an IT teacher) (outside of NUS) and are interested to know the answers, please drop an email to stevenhalim at gmail dot com (show your University staff profile/relevant proof to Steven) for Steven to manually activate this CS lecturer-only feature for you.
FAQ: This feature will NOT be given to anyone else who is not a CS lecturer.
You have reached the last slide. 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 Close
Please rotate your device to landscape mode for a better user experience
Please make the window wider for a better user experience
Visualisation Scale
Toggle V. Number for 0.5x
Edit Graph
Example Graphs
Depth-First Search
Breadth-First Search
Topological Sort
Bipartite Graph Check
Cut Vertex & Bridge
SCC Algorithms
2-SAT Checker
>
1.0x (Default)
0.5x (Minimal Details)
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
Large Graph
Large, Cycles
s =
Go
s =
Go
DFS version
BFS version (Kahn's algorithm)
DFS version
BFS version
Kosaraju's Algorithm
Tarjan's Algorithm
Number of clauses =
Number of variables =
GO
1.0x
About
Team
Terms of use
Privacy Policy
About✕
Initially conceived in 2011 by Associate Professor Steven Halim, VisuAlgo aimed to facilitate a deeper understanding of data structures and algorithms for his students by providing a self-paced, interactive learning platform.Featuring numerous advanced algorithms discussed in Dr. Steven Halim's book, 'Competitive Programming' — co-authored with Dr. Felix Halim and Dr. Suhendry Effendy — VisuAlgo remains the exclusive platform for visualizing and animating several of these complex algorithms even after a decade.While primarily designed for National University of Singapore (NUS) students enrolled in various data structure and algorithm courses (e.g., CS1010/equivalent, CS2040/equivalent (including IT5003), CS3230, CS3233, and CS4234), VisuAlgo also serves as a valuable resource for inquisitive minds worldwide, promoting online learning.Initially, VisuAlgo was not designed for small touch screens like smartphones, as intricate algorithm visualizations required substantial pixel space and click-and-drag interactions. For an optimal user experience, a minimum screen resolution of 1366x768 is recommended. However, since April 2022, a mobile (lite) version of VisuAlgo has been made available, making it possible to use a subset of VisuAlgo features on smartphone screens.VisuAlgo remains a work in progress, with the ongoing development of more complex visualizations. At present, the platform features 24 visualization modules.Equipped with a built-in question generator and answer verifier, VisuAlgo's "online quiz system" enables students to test their knowledge of basic data structures and algorithms. Questions are randomly generated based on specific rules, and students' answers are automatically graded upon submission to our grading server. As more CS instructors adopt this online quiz system worldwide, it could effectively eliminate manual basic data structure and algorithm questions from standard Computer Science exams in many universities. By assigning a small (but non-zero) weight to passing the online quiz, CS instructors can significantly enhance their students' mastery of these basic concepts, as they have access to an almost unlimited number of practice questions that can be instantly verified before taking the online quiz. Each VisuAlgo visualization module now includes its own online quiz component.VisuAlgo has been translated into three primary languages: English, Chinese, and Indonesian. Additionally, we have authored public notes about VisuAlgo in various languages, including Indonesian, Korean, Vietnamese, and Thai:
id,
kr,
vn,
th.
Team✕
Project Leader & Advisor (Jul 2011-present)
Associate Professor Steven Halim, School of Computing (SoC), National University of Singapore (NUS)
Dr Felix Halim, Senior Software Engineer, Google (Mountain View)
Undergraduate Student Researchers 1
CDTL TEG 1: Jul 2011-Apr 2012: Koh Zi Chun, Victor Loh Bo Huai
Final Year Project/UROP students 1
Jul 2012-Dec 2013: Phan Thi Quynh Trang, Peter Phandi, Albert Millardo Tjindradinata, Nguyen Hoang Duy
Jun 2013-Apr 2014 Rose Marie Tan Zhao Yun, Ivan Reinaldo
Undergraduate Student Researchers 2
CDTL TEG 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
Final Year Project/UROP students 2
Jun 2014-Apr 2015: Erin Teo Yi Ling, Wang Zi
Jun 2016-Dec 2017: Truong Ngoc Khanh, John Kevin Tjahjadi, Gabriella Michelle, Muhammad Rais Fathin Mudzakir
Aug 2021-Apr 2023: Liu Guangyuan, Manas Vegi, Sha Long, Vuong Hoang Long, Ting Xiao, Lim Dewen Aloysius
Undergraduate Student Researchers 3
Optiver: Aug 2023-Oct 2023: Bui Hong Duc, Oleh Naver, Tay Ngan Lin
Final Year Project/UROP students 3
Aug 2023-Apr 2024: Xiong Jingya, Radian Krisno, Ng Wee Han
List of translators who have contributed ≥ 100 translations can be found at statistics page.
Acknowledgements
NUS CDTL gave Teaching Enhancement Grant to kickstart this project.For Academic Year 2023/24, a generous donation from Optiver will be used to further develop VisuAlgo.
Terms of use✕
VisuAlgo is generously offered at no cost to the global Computer Science community. If you appreciate VisuAlgo, we kindly request that you spread the word about its existence to fellow Computer Science students and instructors. You can share VisuAlgo through social media platforms (e.g., Facebook, YouTube, Instagram, TikTok, Twitter, etc), course webpages, blog reviews, emails, and more.Data Structures and Algorithms (DSA) students and instructors are welcome to use this website directly for their classes. If you capture screenshots or videos from this site, feel free to use them elsewhere, provided that you cite the URL of this website (https://visualgo.net) and/or the list of publications below as references. However, please refrain from downloading VisuAlgo's client-side files and hosting them on your website, as this constitutes plagiarism. At this time, we do not permit others to fork this project or create VisuAlgo variants. Personal use of an offline copy of the client-side VisuAlgo is acceptable.Please note that VisuAlgo's online quiz component has a substantial server-side element, and it is not easy to save server-side scripts and databases locally. Currently, the general public can access the online quiz system only through the 'training mode.' The 'test mode' offers a more controlled environment for using randomly generated questions and automatic verification in real examinations at NUS.List of Publications This work has been presented at the CLI Workshop at the ICPC World Finals 2012 (Poland, Warsaw) and at the IOI Conference at IOI 2012 (Sirmione-Montichiari, Italy). You can click this link to read our 2012 paper about this system (it was not yet called VisuAlgo back in 2012) and this link for the short update in 2015 (to link VisuAlgo name with the previous project).Bug Reports or Request for New Features VisuAlgo is not a finished project. Associate Professor Steven Halim is still actively improving VisuAlgo. If you are using VisuAlgo and spot a bug in any of our visualization page/online quiz tool or if you want to request for new features, please contact Associate Professor Steven Halim. His contact is the concatenation of his name and add gmail dot com.
Privacy Policy✕
Version 1.2 (Updated Fri, 18 Aug 2023).Since Fri, 18 Aug 2023, we no longer use Google Analytics. Thus, all cookies that we use now are solely for the operations of this website. The annoying cookie-consent popup is now turned off even for first-time visitors.Since Fri, 07 Jun 2023, thanks to a generous donation by Optiver, anyone in the world can self-create a VisuAlgo account to store a few customization settings (e.g., layout mode, default language, playback speed, etc).Additionally, for NUS students, by using a VisuAlgo account (a tuple of NUS official email address, student name as in the class roster, and a password that is encrypted on the server side — no other personal data is stored), you are giving a consent for your course lecturer to keep track of your e-lecture slides reading and online quiz training progresses that is needed to run the course smoothly. Your VisuAlgo account will also be needed for taking NUS official VisuAlgo Online Quizzes and thus passing your account credentials to another person to do the Online Quiz on your behalf constitutes an academic offense. Your user account will be purged after the conclusion of the course unless you choose to keep your account (OPT-IN). Access to the full VisuAlgo database (with encrypted passwords) is limited to Prof Halim himself.For other CS lecturers worldwide who have written to Steven, a VisuAlgo account (your (non-NUS) email address, you can use any display name, and encrypted password) is needed to distinguish your online credential versus the rest of the world. Your account will have CS lecturer specific features, namely the ability to see the hidden slides that contain (interesting) answers to the questions presented in the preceding slides before the hidden slides. You can also access Hard setting of the VisuAlgo Online Quizzes. You can freely use the material to enhance your data structures and algorithm classes. Note that there can be other CS lecturer specific features in the future.For anyone with VisuAlgo account, you can remove your own account by yourself should you wish to no longer be associated with VisuAlgo tool.