mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-09-20 07:43:04 +08:00
Update Median
This commit is contained in:
parent
b86d99edb2
commit
5efb99b401
@ -1,3 +1,8 @@
|
|||||||
|
//This this function is use to calculate the median of array
|
||||||
|
|
||||||
|
@param num
|
||||||
|
@return median
|
||||||
|
|
||||||
alert(selectMedian([75,3,5,52300,5,4,0,123,2,76,768,28]));
|
alert(selectMedian([75,3,5,52300,5,4,0,123,2,76,768,28]));
|
||||||
|
|
||||||
function selectMedian(arr) {
|
function selectMedian(arr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user