http://qs1969.pair.com?node_id=913767


in reply to Binary value of string

I also recommend using an existing hashing algorithm. Just using the binary value of a character and then calculating the sum won't detect any character transposition. The values for the following 3 strings will all be the same:

  • "A String"
  • "String A"
  • "gnirtS A"