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"
  • Replies are listed 'Best First'.
    Re^2: Binary value of string
    by ikegami (Patriarch) on Jul 11, 2011 at 21:15 UTC

      Examples using actual words:

      • loaf and foal
      • tort and trot
      • ant and tan
      • tame and mate
      • time and mite
      • tome and mote
      • ...