Prüfer 序列 #1207
Replies: 5 comments 1 reply
-
为什么是线性的?指针不会不断往回跳然后扫过去吗? |
Beta Was this translation helpful? Give feedback.
-
考虑这样一棵树:1,n-1,2,n-2,3,n-3,...floor(n/2),ceil(n/2),n 那那个线性构造的算法就是 O(n^2)的了... |
Beta Was this translation helpful? Give feedback.
-
这个页面为啥不在“树上问题”里啊 |
Beta Was this translation helpful? Give feedback.
-
我也认为本文树转序列的“线性做法”可卡,于是去看了原文,发现:原文的确保证了线性,但本文的表述有不清晰之处,导致误解。 |
Beta Was this translation helpful? Give feedback.
-
最开始我看线性做法也感觉有问题,后来仔细想了想发现很妙,觉得有比较重要的两点:
|
Beta Was this translation helpful? Give feedback.
-
Prüfer 序列
OI Wiki 是一个编程竞赛知识整合站点,提供有趣又实用的编程竞赛知识以及其他有帮助的内容,帮助广大编程竞赛爱好者更快更深入地学习编程竞赛
https://oi-wiki.org/graph/prufer/
Beta Was this translation helpful? Give feedback.
All reactions