given two arrays which are sorted find the median element of both the arrays