Question regarding time complexity

Revision en1, by skpro19, 2017-07-21 22:10:33

I am solving this DIV 2C. This is my submission which got accepted.

My question is this:

Why isn't updating the parent of a node, an O(n) operation ?


  Rev. Lang. By When Δ Comment
en1 English skpro19 2017-07-21 22:10:33 297 Initial revision (published)