Beginner friendly solution withs comments | Beats 93%
Intuition\nAs zero are disturbing our answer, we solve every subarray which  have no zeros in it. \n\n# Approach\n-In the subarrays their are 2 cases possible :
# Intuition\nAs zero are disturbing our answer, we solve every subarray which  have no zeros in it. \n\n# Approach\n-In the subarrays their are 2 cases possible :\n -\n- number of negatives are even. [ answer: subarray.size() ]\n- number of negatives are odd.  \n   [ answer: MAX OF size after leaving last occuring negative , size after leaving last occuring negative ]\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int solve(int start, int end, int negs, vector<int>& nums)\n    {\n        if(start>end) return 0;\n        if(negs%2==0) return end-start+1;\n        int i=start, j=end;\n        while(nums[i]>0) i++;\n        while(nums[j]>0) j--;\n        return max(end-i, j-start);\n    }\n    int getMaxLen(vector<int>& nums) {\n        int i,j=0, negs=0, ans=0, n=nums.size();\n        \n        for(i=0;i<n;i++)\n        {\n            if(nums[i]<0) negs++;\n            else if(nums[i]==0) \n            {\n                ans=max(solve(j,i-1,negs,nums),ans);\n                negs=0;\n                j=i+1;\n            }\n        }\n        // last subarray is not been solved yet so:\n        ans=max(ans,solve(j,i-1,negs,nums));\n        return ans;\n    }\n};\n```
['Divide and Conquer', 'Greedy', 'C++']