c[s.charAt(i)]++;

c[s.charAt(i)]++; how this will add the value
c[β€˜a’]++ ; means??? c[β€˜a’]=c[β€˜a’]+1; ??? Can you explain?

@pallavigoel1996 this will just have the count of character a being held in c incremented by one. so every β€˜char’ that is encountered increments its c[β€˜char’] inc by 1 .