(self, bit_tree, i, v)
Updates a node in Binary Index Tree (bit_tree) at given index in bit_tree. The given value 'val' is added to bit_tree[i] and all of its ancestors in tree.
Updates a node in Binary Index Tree (bit_tree) at given index in bit_tree. The given value 'val' is added to bit_tree[i] and all of its ancestors in tree.
Updates a node in Binary Index Tree ( bit_tree ) at given index in bit_tree . The given value val is added to bit_tree [ i ] and all of its ancestors in tree .
def update_bit(self, bit_tree, i, v):
        """
             Updates a node in Binary Index Tree (bit_tree) at given index in bit_tree. The given value 'val' is added to bit_tree[i] and all of its ancestors in tree. 
        """
      
        # index in bit_ree[] is 1 more than the index in arr[] 
        i += 1
      
        # Traverse all ancestors and add 'val' 
        while i <= self.n: 
      
            # Add 'val' to current node of bit_tree 
            bit_tree[i] += v 
      
            # Update index to that of parent in update View 
            i += i & (-i)
def update_bit ( self , bit_tree , i , v ) : # index in bit_ree[] is 1 more than the index in arr[]  i += 1 # Traverse all ancestors and add 'val'  while i <= self . n : # Add 'val' to current node of bit_tree  bit_tree [ i ] += v # Update index to that of parent in update View  i += i & ( - i )