Sha256: 7d443535303b8c5e9668144c6fd45b2a4bcded218c0d375ee8acb76175e39c61

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

{
    "cases": [
        {
            "description": "count one word",
            "input": "word",
            "expected": {"word": 1}
        },
        {
            "description": "count one of each word",
            "input": "one of each",
            "expected": { "one": 1, "of": 1, "each": 1 }
        },
        {
            "description": "multiple occurrences of a word",
            "input": "one fish two fish red fish blue fish",
            "expected": { "one" : 1, "fish" : 4, "two" : 1, "red" : 1, "blue" : 1 }
        },
        {
            "description": "ignore punctuation",
            "input": "car : carpet as java : javascript!!&@$%^&",
            "expected": { "car" : 1, "carpet" : 1, "as" : 1, "java" : 1, "javascript" : 1 }
        },
        {
            "description": "include numbers",
            "input": "testing, 1, 2 testing",
            "expected": { "testing" : 2, "1" : 1, "2" : 1 }
        },
        {
            "description": "normalize case",
            "input": "go Go GO Stop stop",
            "expected": { "go" : 3, "stop" : 2 }
        }
    ]
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
trackler-1.0.1.0 common/exercises/word-count/canonical-data.json
trackler-1.0.0.1 common/exercises/word-count/canonical-data.json
trackler-1.0.0 common/exercises/word-count/canonical-data.json