Construct the Fenwick Tree
buildTree ( str ) ; System . out . print ( printCharacter ( str , 1 , 2 , 2 ) + "NEW_LINE"); updateTree ( str , 4 , ' g ' ) ; System . out . print ( printCharacter ( str , 1 , 5 , 4 ) + "NEW_LINE"); } }