3 ms Beats 98.49% || Clean & Easy ^_^ Java Solution with O(n) TC & O(1) SC
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: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public long minSum(int[] nums1, int[] nums2) {\n        \n        long sum1   = 0;\n        long sum2   = 0;\n        int no1_0s = 0;\n        int no2_0s = 0;\n\n        for(int i : nums1){\n            sum1 += i;\n            no1_0s += (i == 0) ? 1 : 0;\n        }\n\n        for(int j : nums2){\n            sum2 += j;\n            no2_0s += (j == 0) ? 1 : 0;\n        }\n\n        if((no2_0s == 0 && sum1+no1_0s > sum2) || (no1_0s == 0 && sum2+no2_0s > sum1))\n            return -1;\n\n        return Math.max(sum1+no1_0s, sum2+no2_0s);\n    }\n}\n```
['Java']