V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
jijifujiji
V2EX  ›  算法

算法 4 中并查集的算法效率分析

  •  
  •   jijifujiji · Oct 16, 2020 · 2067 views
    This topic created in 2031 days ago, the information mentioned may be changed or developed.

    请问 quick-find 算法 在 quick-find 算法中,每次 f i n d ( ) 调用只需要访问数组一次,而归并两个分量的 u n i o n ( )操作访问数组的次数在 (N+3) 到 (2N+1) 之间。 quick-union 算法 在最坏情况下,这需要 2N+1 次数组访问 这两个算法的效率是怎么分析出来的

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3206 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:56 · PVG 18:56 · LAX 03:56 · JFK 06:56
    ♥ Do have faith in what you're doing.