Easy JS Solution | O(n)
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nlet digitCount = function(num) {\n    let map = new Map();\n\n    // Set Key:Value To Map\n    for(let val of num) {\n        // Covert string to number\n        let n = Number(val)\n        map.set(n, map.get(n) + 1 || 1);\n    }\n\n    // Compare\n    for(let i = 0; i < num.length; i++) {\n        if(map.get(i) === Number(num[i])) {\n            continue;\n        } else if(!map.get(i) && Number(num[i]) === 0) {\n            continue;\n        }\n        return false;\n    }\n    return true;\n};\n```
['Hash Table', 'String', 'JavaScript']