@@ -0,0 +1,722 @@
+public class Solution %7B%0A  // O(n + m) time and O(n + m) space%0A  public double findMedianSortedArrays(int%5B%5D nums1, int%5B%5D nums2) %7B%0A    int%5B%5D res = new int%5Bnums1.length + nums2.length%5D;%0A    int index = 0, i = 0, j = 0;%0A    while (i %3C nums1.length && j %3C nums2.length) %7B%0A      if (nums1%5Bi%5D %3C nums2%5Bj%5D) %7B%0A        res%5Bindex++%5D = nums1%5Bi++%5D;%0A      %7D else %7B%0A        res%5Bindex++%5D = nums2%5Bj++%5D;%0A      %7D%0A    %7D%0A%0A    while (i %3C nums1.length) res%5Bindex++%5D = nums1%5Bi++%5D;%0A    while (j %3C nums2.length) res%5Bindex++%5D = nums2%5Bj++%5D;%0A%0A    if (res.length %25 2 == 1) %7B%0A      return (double) res%5B(res.length - 1) / 2%5D;%0A    %7D else %7B%0A      int a = res%5B(res.length - 1) / 2%5D;%0A      int b = res%5Bres.length / 2%5D;%0A      return (a + b) / 2.0;%0A    %7D%0A  %7D%0A%7D%0A

add solution