Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution(object):
- def findMedianSortedArrays(self, nums1, nums2):
- """
- :type nums1: List[int]
- :type nums2: List[int]
- :rtype: float
- """
- nums3 = sorted (nums1 + nums2)
- numsEls =len(nums3)
- if numsEls % 2 == 0:
- Left, Right = int(numsEls/2)-1 , int (numsEls/2)
- return (float (nums3[Left]+ nums3[Right])/2)
- else:
- return nums3[int(numsEls/2)]
Add Comment
Please, Sign In to add comment