Persistent Segment Trees and Heavy Light Decomposition

Can somebody share array-implementation of persistent segment tree(without using pointers) and 2-3(easy) related problems ?

@harshraj22

Also, can somebody share an implementation of HLD which does not invovle pointers?(Pointers are slow and explode the memory)

Thanks :slight_smile:

3 Likes

:astonished::astonished: I haven’t done many, but here is one implementation of persistent segment tree (array implementation). Codeforces for problems :yum::yum:

4 Likes

https://codeforces.com/blog/entry/22072
https://codeforces.com/blog/entry/53170

https://www.codechef.com/problems/OAK

Summary

https://lmgtfy.com/?q=persistent+segment+tree+codeforces
https://lmgtfy.com/?q=hld+codeforces

8 Likes