当前位置:   article > 正文

数据结构与算法 并查集_let t be a tree created by union-by-size with n no

let t be a tree created by union-by-size with n nodes, then the height of t

1-1
In Union/Find algorithm, if Unions are done by size, the depth of any node must be no more than N/2, but not O(logN). F
Time complexity of N Union and M Find operations is now O( N + M log2 N ).
Let T be a tree created by union-by-size with N nodes, then height(T)<=(log2N)+1;
2-6
Let T be a tree created by union-by-size with N nodes, then the height of T can be . A
A.at most log 2(N)+1
B.at least log2(N)+1
C.as large as N
D.anything that is greater than 1
2-5
In a disjoint set problem, given a set of m elements S = { 1, 2, 3, …, m } and n ( 0<n<m ) distinct relations, the set S must have __ equivalence classes. D
A.at leatst m
B.exactly n
C.exactly m−n
D.at least m−n

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/557617
推荐阅读
相关标签
  

闽ICP备14008679号