@@ -0,0 +1,1168 @@
+class NaiveSolution(object):%0A    @staticmethod%0A    def merge_two(left, right):%0A        nums3 = %5B%5D%0A        idx_left = 0%0A        idx_right = 0%0A        while idx_left %3C len(left) or idx_right %3C len(right):%0A            print idx_left, idx_right%0A            if idx_right == len(right):%0A                nums3.append(left%5Bidx_left%5D)%0A                idx_left += 1%0A            elif idx_left == len(left):%0A                nums3.append(right%5Bidx_right%5D)%0A                idx_right += 1%0A            elif left%5Bidx_left%5D %3C right%5Bidx_right%5D:%0A                nums3.append(left%5Bidx_left%5D)%0A                idx_left += 1%0A            else:%0A                nums3.append(right%5Bidx_right%5D)%0A                idx_right += 1%0A        nums3 = map(float, nums3)%0A        return nums3%0A%0A    def findMedianSortedArrays(self, left, right):%0A        %22%22%22%0A        :type nums1: List%5Bint%5D%0A        :type nums2: List%5Bint%5D%0A        :rtype: float%0A        %22%22%22%0A        nums3 = NaiveSolution.merge_two(left, right)%0A        return (nums3%5B(len(nums3) - 1) / 2%5D + nums3%5Blen(nums3) / 2%5D) / 2%0A%0A%0Aif __name__ == '__main__':%0A    nums1 = %5B1, 2%5D%0A    nums2 = %5B3, 4%5D%0A    print NaiveSolution().findMedianSortedArrays(nums1, nums2)%0A

add naive impl to refine it with binary search