Simple Solution || Easy to Understand 💡 || Java ⚡💯
Do upvote if you like the solution! \u2B06\uFE0F\uD83D\uDC4D\n# Code\n\nclass Solution {\n    public long minSum(int[] nums1, int[] nums2) {\n        long sum1 
Do upvote if you like the solution! \u2B06\uFE0F\uD83D\uDC4D\n# Code\n```\nclass Solution {\n    public long minSum(int[] nums1, int[] nums2) {\n        long sum1 = 0, sum2 = 0;\n        int zeros1 = 0, zeros2 = 0;\n        int minSum = 0;\n        \n        for(int i = 0; i < nums1.length; i++) {\n            sum1 += nums1[i];\n            if(nums1[i] == 0)\n                zeros1 += 1;\n        }\n        for(int i = 0; i < nums2.length; i++) {\n            sum2 += nums2[i];\n            if(nums2[i] == 0)\n                zeros2 += 1;\n        }\n        sum1 += zeros1;\n        sum2 += zeros2;\n        \n        if(zeros1 == 0 && (sum1 < sum2) || zeros2 == 0 && (sum1 > sum2))\n            return -1;\n        \n        return Math.max(sum1, sum2);\n        \n    }\n}\n```
['Array', 'Math', 'Java']