Direct i question help

Revision en1, by aman_naughty, 2019-10-15 08:45:18

Problem link

I could not think of any approach but just am getting an intuition of using DSU in reverse or querying offline but I can't think of anything. Someone please help.

I just need an approach not complete code.:)

Tags #interview, directi, #help, #tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English aman_naughty 2019-10-15 08:48:42 71
en1 English aman_naughty 2019-10-15 08:45:18 278 Initial revision (published)