ShinriiTin/templates/data-structure

SparseTable

时间复杂度: \(O(n\log{n})-O(1)\)

空间复杂度: \(O(n\log{n})\)

MyCode

Link-Cut Tree

时间复杂度:\(O(n\log{n})\)

空间复杂度:\(O(n)\)

MyCode(不换根)