RMQ for a path in a tree with nodes that has values

Revision en1, by AbdoGad, 2023-05-30 23:51:47

Hello I have a question if I have a tree with n nodes and all nodes have some value there are two types of queries

  1. what is the max node value in the path (u,v)

  2. update u to be equal to x

I think HLD can solve this problem but I want to know if there is other ways or techniques that can solve a problem like this

Thank you


  Rev. Lang. By When Δ Comment
en2 English AbdoGad 2023-05-31 04:13:47 68
en1 English AbdoGad 2023-05-30 23:51:47 391 Initial revision (published)