Median of two arrays

Write codeHard30 minGoogle and Amazon style

Your task

Given two sorted integer arrays a and b, return the median of the combined sorted array as a float. Either array may be empty (but not both). The combined length is at least 1. Return a float (e.g. 2.0 or 2.5).

Examples

median_two_sorted(a: list[int], b: list[int]) -> float
Example 1
Inputmedian_two_sorted([1, 3], [2])
Output2