Sha256: f57086cdab4164b295ca25092ff3040af0efebf8555c7c0feff616000cebbcbf

Contents?: true

Size: 485 Bytes

Versions: 20

Compression:

Stored size: 485 Bytes

Contents

module hamming;

unittest
{
const int allTestsEnabled = 0;

    assert(distance("A", "A") == 0);
static if (allTestsEnabled)
{
    assert(distance("A", "G") == 1);
    assert(distance("AG", "CT") == 2);
    assert(distance("AT", "CT") == 1);
    assert(distance("GGACG", "GGTCG") == 1);
    assertThrown(distance("AAAG", "AAA"));
    assertThrown(distance("AAA", "AAAG"));
    assert(distance("GATACA", "GCATAA") == 4);
    assert(distance("GGACGGATTCTG", "AGGACGGATTCT") == 9);
}

}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
trackler-2.1.0.48 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.47 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.46 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.45 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.44 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.43 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.42 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.41 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.40 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.39 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.38 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.37 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.36 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.34 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.33 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.32 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.31 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.30 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.29 tracks/dlang/exercises/hamming/source/hamming.d
trackler-2.1.0.28 tracks/dlang/exercises/hamming/source/hamming.d