[Java] Simple bit shifting | O(n) time, O(1) space
```\nclass Solution {\n    public List prefixesDivBy5(int[] A) {\n       \n        List result = new ArrayList<>(A.length);\n        int num = 0;\n        for(i
```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] A) {\n       \n        List<Boolean> result = new ArrayList<>(A.length);\n        int num = 0;\n        for(int i = 0; i < A.length; i++) {\n            num <<= 1;\n            num |= A[i];\n            result.add((num = (num % 5)) == 0 ? true: false);\n        }\n        return result;\n    }\n}
['Bit Manipulation', 'Java']