Problem in point update

wrong ans

@pankajpoply45,
I think you should make the array 0-indexed.

I have tried 0 indexed first but it has same problem.

@pankajpoply45,
Please share the 0-indexed code.

here is the 0 indexed array code

@pankajpoply45,
Corrected code, here

why we have to change the array when we are accessing ans from tree array.

@pankajpoply45,
Just a precautionary step, and a logical one as well, the array should indeed change right, after each update…so why not do it…??