DFS序与欧拉序的区别

https://blog.csdn.net/wcxyky/article/details/102411972?spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-5.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-5.pc_relevant_default&utm_relevant_index=10

 

https://blog.csdn.net/NOI_yzk/article/details/78250660?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_antiscanv2&utm_relevant_index=2

 

dfs序有三种

长度为N的

长度为2N-1的,欧拉序,似乎只能用来求LCA

长度为2N的。一些用于差分求树上子树统计问题,再就是树上莫队算法

 

posted @ 2022-03-10 20:10  我微笑不代表我快乐  阅读(43)  评论(0编辑  收藏  举报