Java Solution for Splitting an Array into Maximum Number of Subarrays
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int maxSubarrays(int[] nums) {\n        int result =0;\n        int temp;\n        int min = nums[0];\n        int temp2=nums[0];\n        int index;\n        for(int i: nums){\n            temp2 &= i;\n            if(temp2 < min){\n                min = temp2;\n            }\n        }\n        for(int i=0;i<nums.length;i++){\n            index = -1;\n            temp = nums[i];\n            for(int j=i;j<nums.length;j++){\n                temp &= nums[j];\n                if(temp == min){\n                    index = j;\n                    if(min ==0){\n                        i=j;\n                        result++;\n                        break;\n                    }\n                                        \n                }\n                if(j == nums.length -1 && index != -1){\n                    i=index;\n                    result ++;\n                }\n            }\n\n        }\n        return result;\n\n\n        \n    }\n}\n```
['Array', 'Greedy', 'Bit Manipulation', 'Java']