|
|
back to board Edited by author 02.05.2011 23:00 There is a method that you can find the solution with one loop. here is a hint: 1. if solution is s and sn is the number of s, then 2 * sn > n 2. if you delete any two different numbers until there is no different number, so this number is s.(because 2 * sn > n). And you can do deleting with one loop. good luck Thanks use quickSort and output [n/2] value... |
|
|