Daily challenge for 2025-06-24
175. Calculate Median of Array
Write a function solve that calculates the median of an array of numbers. The median is the middle value when numbers are sorted. For even-length arrays, return the average of the two middle values.
Example:Input: [3, 1, 2]Output: 2
Example 2:Input: [1, 2, 3, 4]Output: 2.5
Run this challenge interactively in Python or JavaScript when the app loads.