PlanetScaleSoftware Engineer · Take-home ProjectCodemia practiceCount median in matrix
Given a matrix of integers, write a function to calculate the median value of all the elements in the matrix. The input will be a 2D array of integers, and the output should be a single integer representing the median. If the total number of elements is even, return the average of the two middle values as an integer.
Medium
Coding & Algorithms