Is it possible to split a sequence of numbers into two groups based in median value without sorting?
- by Everaldo Aguiar
Is there an algorithm to split a sequence of random numbers into two groups based on a median value determined on the fly(without sorting them)?
Ex. If I have the sequence 2-3-6-7-1-4-5, the result would be two separated groups:
A) 1 2 3
B) 5 6 7
Median value: 4