0 out of 464 challenges solved

Median of Two Sorted Lists

Write a function `get_median(arr1, arr2, n)` that takes two sorted lists `arr1` and `arr2` of the same size `n` and returns the median of the combined sorted list.

The median is the middle value in an ordered list of numbers. If the list has an even number of elements, the median is the average of the two middle numbers.

#### Example Usage
```python [main.nopy]
arr1 = [1, 12, 15, 26, 38]
arr2 = [2, 13, 17, 30, 45]
n = 5
print(get_median(arr1, arr2, n))  # Output: 16.0

arr1 = [2, 4, 8, 9]
arr2 = [7, 13, 19, 28]
n = 4
print(get_median(arr1, arr2, n))  # Output: 8.5
```

#### Constraints
- Both `arr1` and `arr2` are sorted in ascending order.
- Both lists have the same number of elements `n`.
- The function should run efficiently for large values of `n`.
def get_median(arr1, arr2, n):
    """
    Calculate the median of two sorted lists of the same size.

    Args:
    arr1 (list): First sorted list.
    arr2 (list): Second sorted list.
    n (int): Size of each list.

    Returns:
    float: The median of the combined sorted list.
    """
    # Placeholder for the solution
    pass