Intuitive C++ Solution
First find all the ranges without zero i.e. divide the array whereever we found the zero as we need only positive product and once zero will be there it can\'t 
1. First find all the ranges without zero i.e. divide the array whereever we found the zero as we need only positive product and once zero will be there it can\'t be never positive.\n2. Now store the position of elements which are negative in these sub arrays.\n3. If total number of negative integers are even, then include the whole subarray. \n4. If odd, then either exclude the part of sub array from last negative integer to the last element of subarray or from first negative integer to first element of subarray.\n```\nclass Solution {\npublic:\n    int getMaxLen(vector<int>& nums) {\n        int n = nums.size();\n        vector<vector<int>> zeros_pos;\n        int first = 0;\n        for (int i = 0; i < n; i++) {\n            if (nums[i] == 0) {\n                zeros_pos.push_back({first, i});\n                first = i + 1;\n            }\n        }     \n        zeros_pos.push_back({first, n});\n        int ans_ = 0;\n        for (auto i : zeros_pos) {\n            vector<int> pos_neg;\n            for (int j = i[0]; j < i[1]; j++) {\n                if (nums[j] < 0) pos_neg.push_back(j);\n               \n            }\n            if (pos_neg.size() % 2 == 0) {\n                ans_ = max(ans_, i[1] - i[0]);\n            } \n            else {\n                ans_ = max(ans_, max(i[1] - pos_neg[0] - 1, pos_neg[pos_neg.size() - 1] - i[0]));\n            }\n        }\n        return ans_;      \n    }\n};\n```
['C']