IBM to pay more than $30m in compensation for Australian census fail
abc.net.au87 pointsby timv42 comments
[ 2, 4, 7, 5, 3, 6, 1 ]
We pivot on the mid-point (5) so that values less than end before it in the array and numbers larger end up after it [ 2, 4, 3, 1, 5, 7, 6 ]
Since 5 is now at an index greater than the midpoint, you know the median must be less than 5, so you don't care that 7 and 6 aren't sorted. [ 2, 1, 3, 4, 5, 7, 6 ]
We don't care that 2 and 1 are unsorted, because we know that the median is > 3 (3 is at index #2 and we want index #3), so the median must be 4
Sydney, Australia
Email: my-hn-username (at) adjective.org
-------------------------------
Current:
- Elastic (elastic.co)
Previous:
- Prospection (prospection.com.au)
- Site Tour (sitetour.co)
- ActiveGrade (activegrade.com)
- Dragonfly Technologies (dragonflytechnologies.com.au)
- Carpadium Consulting (carpadium.com)
- Macquarie Group (macquarie.com)
-------------------------------