Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bead sort
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Complexity== Bead sort can be implemented with four general levels of complexity, among others: *''[[Big O Notation|O]]''(1): The beads are all moved simultaneously in the same time unit, as would be the case with the simple physical example above. This is an abstract complexity, and cannot be implemented in practice. *''[[Big O Notation|O]]''(<math>\sqrt{n}</math>): In a realistic physical model that uses gravity, the time it takes to let the beads fall is proportional to the square root of the maximum height, which is proportional to n. *''[[Big O Notation|O]]''(n): The beads are moved one row at a time. This is the case used in the analog and [[digital hardware]] solutions. *''[[Big O Notation|O]]''(S), where S is the sum of the integers in the input set: Each bead is moved individually. This is the case when bead sort is implemented without a mechanism to assist in finding empty spaces below the beads, such as in software implementations. Like the [[Pigeonhole sort]], bead sort is unusual in that in worst case it can perform faster than ''[[Big O Notation|O]]''(''n'' [[logarithm|log]] ''n''), the fastest performance possible for a [[comparison sort]] in worst case. This is possible because the key for a bead sort is always a positive integer and bead sort exploits its structure.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)