Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
NetMageSCW
5 months ago
|
parent
|
context
|
favorite
| on:
Quicksort explained IKEA-style
How do you decide which weight to use to create two halves?
CyberDildonics
5 months ago
|
next
[–]
You use a value called a pivot, not a weight, and there are many ways and endless variations you can read about, including just choosing a random value from the current range.
tialaramex
5 months ago
|
prev
[–]
In their example they choose a random pivot, is that what you're asking about?
There are a number of strategies but random will indeed work and is simple to explain.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: