Creating the Binary Index Tree of all aphabet
def buildBIT ( tree , str1 , n ) : NEW_LINE INDENT for i in range ( n ) : NEW_LINE INDENT update ( tree , i + 1 , 1 , ord ( str1 [ i ] ) - 97 + 1 ) ; NEW_LINE DEDENT DEDENT