Pls provide some hint how we can solve 3-d structure question using BIT tree(question is included)

@harry_potter123,