in reply to The sum of absolute differences in the counts of chars in two strings.

Are the strings likely to be equals ( or almost ) ? If so you could use a moving pointers and only do the counting if the characters at the pointer's position differ saving some cycles.

  • Comment on Re: The sum of absolute differences in the counts of chars in two strings.