Java easy solution beats 100%
Intuition\nFigure out what will be the possible cases for each ? given.\n\n# Complexity\n- Time complexity: O(1) \n\n- Space complexity: O(1)\n\n# Code\n\nclass
# Intuition\nFigure out what will be the possible cases for each *?* given.\n\n# Complexity\n- Time complexity: $$O(1)$$ \n\n- Space complexity: $$O(1)$$\n\n# Code\n```\nclass Solution {\n    public int countTime(String time) {\n        int choices = 1;\n\n        if (time.charAt(0) == \'?\' && time.charAt(1) == \'?\') {\n            choices *= 24;\n        }\n\n        if (time.charAt(0) == \'?\' && time.charAt(1) != \'?\') {\n            choices *= (time.charAt(1) < \'4\' ? 3 : 2);\n        } \n\n        if (time.charAt(1) == \'?\' && time.charAt(0) != \'?\') {\n            choices *= (time.charAt(0) < \'2\' ? 10 : 4);\n        }\n\n        if (time.charAt(3) == \'?\') {\n            choices *= 6;\n        }\n\n        if (time.charAt(4) == \'?\') {\n            choices *= 10;\n        }\n\n        return choices;\n    }\n}\n```
['Java']