136. find median of two sorted array

JavaScriptAlgorithm
Is this helpful ?

from all members: - 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])
// 1.5

follow-up

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

Let's try to solve this problem within 10 mintues.