cosmos icon indicating copy to clipboard operation
cosmos copied to clipboard

Find the median of array of numbers

Open win72 opened this issue 9 years ago • 10 comments

Can I implement in C++?

win72 avatar Oct 07 '17 04:10 win72

implemented in java. check #820

its-snorlax avatar Oct 07 '17 07:10 its-snorlax

Sure. Go for it 👍

AdiChat avatar Oct 07 '17 09:10 AdiChat

Done. PR #830 (In C++).

win72 avatar Oct 07 '17 11:10 win72

Where to place the code?

Raghav17 avatar Oct 07 '17 11:10 Raghav17

@Raghav17 add your code here(code/dynamic_programming/Array_Median)

its-snorlax avatar Oct 07 '17 13:10 its-snorlax

Rust implementation #858

Jay9596 avatar Oct 07 '17 15:10 Jay9596

Python implementation in pr #906.

amp180 avatar Oct 08 '17 01:10 amp180

This should really be done with Quickselect. It'll be faster in the average-case [O(n)] than sorting the array [O(nlogn)] and then finding the median.

c650 avatar Oct 08 '17 22:10 c650

Can I implement in c??

akhil117 avatar Oct 10 '17 07:10 akhil117

pr for implementation in c https://github.com/OpenGenus/cosmos/pull/1082

akhil117 avatar Oct 10 '17 08:10 akhil117