Java Solution with Explanation, faster than 100.00%
\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] nums) {\n        int sum = 0;\n        int length = nums.length;\n        List<Boolean> result
```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] nums) {\n        int sum = 0;\n        int length = nums.length;\n        List<Boolean> result = new ArrayList<>();\n        //Go through the nums notice that shifting a binary number to the left is equals to multiplying a decimal number by 2\n        for (int i=0; i<length; i++) {\n            sum = sum*2 + nums[i];\n            if (sum%5==0) {\n                result.add(true);\n            }\n            else {\n                result.add(false);\n            }\n            //This is to prevent it from overflow\n            sum = sum%5;\n        }\n        return result;\n    }\n}\n//Time: O(N)\n//Space: O(N)\n```
['Java']