python-algorithm

leetcode 3131. Find the Integer Added to Array I

무적김두칠 2024. 4. 30. 07:39

https://leetcode.com/problems/find-the-integer-added-to-array-i/description/

 

1
2
3
4
5
6
class Solution:
    def addedInteger(self, nums1: List[int], nums2: List[int]) -> int:
        nums1.sort()
        nums2.sort()
        return nums2[0- nums1[0]
        
cs
반응형