/MedianHeap

PHP does not have a built in function for calculating the median of an array. Write an implementation of a “MedianHeap” class that takes an array of numbers and can output it’s median. Also write a simple array_median() function that does not utilize heap strategies. Please benchmark the 2 solutions and determine which is faster. Please give a brief explanation on why you believe the faster implementation is faster.

Primary LanguagePHP

No issues in this repository yet.