i want to solve it by mapping 3d array into 1d array
using offset calculation
3-D Structure fenwick tree
@abinkumarspn
I dont think your mapping from 3D to 1D is correct
I request you to once dry run it on the sample cases
You will need up update certain segments in the 1D array and not a contiguous segment like you are trying
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.