Replace each node with sum of greater than equal nodes

my code is working fine, it is passing all the testcases. but i am confused because of the problem statement.
the problem statement says that we have to replace each node with the sum of all the nodes which are greater than and equal to that node. but my code will only work if the nodes in the BST are unique and not repeating.
please clarify whether we have to find the sum of greater nodes or greater than equal nodes. thanks.

@Usha24, nodes in a BST are always unique , that is one of the property of a BST
refer this for clarification :- https://stackoverflow.com/questions/300935/are-duplicate-keys-allowed-in-the-definition-of-binary-search-trees

there it is mentioned that all 3 definitions are correct

in general practice we assume the node value to be distinct. you can add = conditions to cover up the case u mentioned if you want

but if duplicates are allowed, then we won’t be able to perform search, delete operations properly

Okay, so we should consider nodes to be unique. Got it.

For = case, we have to use brute force approach. There is no other way possible I guess

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.