At timestamp 4:11

the value of root is not passed by reference so how the values are getting updated

we doesn’t want to change the root of tree
we have to update the value of node so no point of passing root as reference

as we are using address to update value so actually thing is updated no copy is made
hence all changes also reflect in main

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:

1 Like