Array 3131. Find the Integer Added to Array I ¶ Time: $O(n)$ Space: $O(1)$ C++JavaPython 1 2 3 4 5 6class Solution { public: int addedInteger(vector<int>& nums1, vector<int>& nums2) { return ranges::min(nums2) - ranges::min(nums1); } }; 1 2 3 4 5class Solution { public int addedInteger(int[] nums1, int[] nums2) { return Arrays.stream(nums2).min().getAsInt() - Arrays.stream(nums1).min().getAsInt(); } } 1 2 3class Solution: def addedInteger(self, nums1: list[int], nums2: list[int]) -> int: return min(nums2) - min(nums1)