MOST EASY CODE TO UNDERSTAND
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# - Tim
# 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:**Bold**\n\n- Space complexity:\n\n# Code\n```\nclass Solution {\n    public long minSum(int[] nums1, int[] nums2) {\n        long sum1 = 0;\n        long sum2 = 0;\n        int count1 = 0;\n        int count2 = 0;\n\n        for(int i : nums1) {\n            if(i == 0){\n                count1++;\n                sum1++;\n            }\n            else sum1 += i;\n        }\n\n        for(int i : nums2) {\n            if(i == 0) {\n                count2++;\n                sum2++;\n            }\n            else sum2 += i;\n        }\n\n        if(sum1 > sum2 && count2 <= 0) return -1;\n\n        if(sum2 > sum1 && count1 <= 0) return -1;\n\n        if(sum1 == sum2) return sum1;\n\n        return Math.max(sum1, sum2); \n    }\n}\n```
['Array', 'Java']