+ 1
Can anyone suggest a program in C or Java to find the median of an array without sorting it ?
3 Antworten
+ 1
how??
0
The median, by the definition, is the center element of a SORTED array (or the half sum of the two in the center if the array has an even number of elements). If you want to find the median without sorting, make sure your input is sorted :)
0
I found out the code. You can actually find median without sorting