Unable to find out error?

hi @sonal_kumar this is the editorial solution for this problem, please have a look https://ide.codingblocks.com/s/260068

@Ishita thanks but i don’t find my mistake

but it worked somehow

@sonal_kumar there are quite a few differences between these codes, try to analyse them and their effect on the program.
Like in the main function

And when character is + or - you are calling the update function, but you should also update the map.
There are some other differences as well, I’ll leave it upto you to analyse them.