Talk:Heavy-light decomposition

From PEGWiki
Revision as of 12:22, 23 December 2013 by 124.125.21.113 (Talk) (Created page with "The LCA algo is wrong Consider the case 1 / \ 2 4 \ 3 \ 5 H...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The LCA algo is wrong

Consider the case

             1
            / \
           2   4
                \
                 3
                  \ 
                   5

Here a lca(4,2) is returned as 4.