Sha256: 1bd546800c5fbc4fa9ab15660ac18bb8aa22f7e45656457b77016d647d17e0f6
Contents?: true
Size: 318 Bytes
Versions: 270
Compression:
Stored size: 318 Bytes
Contents
object Hamming { fun compute(leftStrand: String, rightStrand: String): Int { require(leftStrand.length == rightStrand.length, {"leftStrand and rightStrand must be of equal length."}) val commonPairs = leftStrand.zip(rightStrand) return commonPairs.count { it.first != it.second } } }
Version data entries
270 entries across 270 versions & 1 rubygems