i have used a map of char ,int to represent fenwick tree ,and i am simply checking the number of odd frequency elements and then printing answer for each query and just increasing frequency of element at indexes for any update by simultaneously decreasing frequency of earlier element.
What is problem with code?
Array of map of char,int **
@chhabrapiyush480
Hello piyush,
u need to build 26 fenwick tree one for each character . are u doing same.?
Hi aman yadav ,according to me there can be multiple ways to solve a problem.kindly see my approach and tell me whats wrong in that code,iknow this can be done by using 26 seperate trees as well,but according to me my code should also work.