i did this problem MARBLEGF Problem - CodeChef using segmented tree concept…but i am getting tle…editorial say to use fenwick tree concept…But i came to know both fenwick tree and segmented tree have same time complexity in worst case which is O(mlogn)…anyone clear my doubt plsss…thanks in advance:)
this is my code which uses the concept of segment tree CodeChef: Practical coding for everyone