Grokking Data Structures & Algorithms for Coding Interviews
Vote

0% completed

​

Median of Two Sorted Arrays (medium)

.....

.....

.....

Like the course? Get enrolled and start learning!
A

Anonymous

· 3 years ago

  1. Example 3:
    • Input: [2, 3, 5, 8] and [1, 4, 6, 7, 9]
    • Expected Output: 5
    • Justification: The merged array would be [10, 15, 20, 25, 30, 35, 40, 45]. The median is the average of the middle two values, 25 and 30, which is (25 + 30) / 2 = 27.5.

the merged array would be wat now?

Show 1 reply

Reading Progress

0%


Vote for new content