Sha256: e674043e3ef3d3831ae6e5b3c0e26b9623be3255bed493442cc6ef8dc124c3dd

Contents?: true

Size: 1.67 KB

Versions: 21

Compression:

Stored size: 1.67 KB

Contents

{
   "encode": {
      "description": "run-length encode a string",
      "cases": [
          {
            "description": "empty string",
            "input": "",
            "expected": ""
          },
          {
            "description": "single characters only are encoded without count",
            "input": "XYZ",
            "expected": "XYZ"
          },
          {
            "description": "string with no single characters",
            "input": "AABBBCCCC",
            "expected": "2A3B4C"
          },
          {
            "description": "single characters mixed with repeated characters",
            "input": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB",
            "expected": "12WB12W3B24WB"
          }
      ]
   },
   "decode": {
      "description": "run-length decode a string",
      "cases": [
          {
            "description": "empty string",
            "input": "",
            "expected": ""
          },
          {
            "description": "single characters only",
            "input": "XYZ",
            "expected": "XYZ"
          },
          {
            "description": "string with no single characters",
            "input": "2A3B4C",
            "expected": "AABBBCCCC"
          },
          {
            "description": "single characters with repeated characters",
            "input": "12WB12W3B24WB",
            "expected": "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB"
          }
      ]
   },
   "consistency": {
      "cases": [
          {
            "description": "encode followed by decode gives original string",
            "input": "zzz ZZ  zZ",
            "expected": "zzz ZZ  zZ"
          }
      ]
   }
}

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
trackler-2.0.8.13 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.12 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.11 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.10 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.9 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.8 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.7 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.6 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.5 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.4 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.3 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.2 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.8.1 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.7.0 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.44 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.43 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.42 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.41 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.40 common/exercises/run-length-encoding/canonical-data.json
trackler-2.0.6.39 common/exercises/run-length-encoding/canonical-data.json