136. find median of two sorted array

medium  - accepted / - tried

Given two sorted array of integers, please return the median.

median([1,2],[3,4,5])
// 3

If there are even numbers, return the average.

median([1,2],[3,4])
// 2.5

follow-up

What is the time & space cost of your approach? Could you do better?

Bugfree ordinary solution is better than buggy fancy ones.

(2)
(63)