spaghetti sort

noun

A linear-time algorithm for sorting a sequence of items, analogous to standing a number of strands of spaghetti of different lengths upright on a surface and noting the order in which they are encountered when lowering one's hand from above.

Meanings

nounspaghetti sort (plural spaghetti sorts)

plural spaghetti sorts

  1. computerA linear-time algorithm for sorting a sequence of items, analogous to standing a number of strands of spaghetti of different lengths upright on a surface and noting the order in which they are encountered when lowering one's hand from above.

Origin

Introduced by A. K. Dewdney in a Scientific American column.

Full word history & related roots →
Cite this entry
APA

spaghetti sort. (n.d.). In WatkinsX Dictionary. Retrieved November 3, 2026, from https://dictionary.watkinsx.com/word/spaghetti%20sort

MLA

“spaghetti sort.” WatkinsX Dictionary, https://dictionary.watkinsx.com/word/spaghetti%20sort. Accessed November 3, 2026.

Chicago

WatkinsX Dictionary, s.v. “spaghetti sort,” accessed November 3, 2026, https://dictionary.watkinsx.com/word/spaghetti%20sort.

Source: spaghetti sort on Wiktionary, CC BY-SA 4.0.