Wrong answer in a problem

https://ide.codingblocks.com/#/s/19082
https://hack.codingblocks.com/contests/c/471/1551

For the case,

1
abde
abababababbe

Your code gives 1 as output but actually it should be 10. This is because you’re not taking into account the count of repeated characters. You should do s[str[i]]++ instead of just assigning them 1 and then count the absolute difference between the counts of individual characters from both the strings.

Just in case, https://ide.codingblocks.com/#/s/19174