Condition for possiblity when left chid became right child and vice versa .
if ( i != j // i ) : NEW_LINE INDENT value [ j ] = value [ j ] + ( value [ i ] * value [ j // i ] ) NEW_LINE DEDENT j += i NEW_LINE ans += value [ i ] NEW_LINE return ans NEW_LINE