Sha256: 256e07911faacc7b0545389b49c67e69cd2e08e0b0096af4e4db5af8a3baffba

Contents?: true

Size: 183 Bytes

Versions: 374

Compression:

Stored size: 183 Bytes

Contents

class Hamming {

    def compute(strand1, strand2) {
        (0..[strand1.size(), strand2.size()].min() - 1).step(1).count() {
          strand1[it] != strand2[it]
        }
    }

}

Version data entries

374 entries across 374 versions & 1 rubygems

Version Path
trackler-2.0.4.0 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.9 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.8 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.7 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.6 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.5 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.4 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.3 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.2 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.1 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.3.0 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.2.0 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.1.2 tracks/groovy/exercises/hamming/Example.groovy
trackler-2.0.1.1 tracks/groovy/exercises/hamming/Example.groovy