15 lines
2.5 KiB
HTML
15 lines
2.5 KiB
HTML
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>bubble sort</title><link rel="stylesheet" href="../../jargon.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"/><link rel="home" href="../index.html" title="The Jargon File"/><link rel="up" href="../B.html" title="B"/><link rel="previous" href="BUAG.html" title="BUAG"/><link rel="next" href="bucky-bits.html" title="bucky bits"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bubble sort</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="BUAG.html">Prev</a> </td><th width="60%" align="center">B</th><td width="20%" align="right"> <a accesskey="n" href="bucky-bits.html">Next</a></td></tr></table><hr/></div><dt><a id="bubble-sort"/><dt xmlns="" id="bubble-sort"><b>bubble sort</b>: <span xmlns="http://www.w3.org/1999/xhtml" class="grammar">n.</span></dt></dt><dd><p> Techspeak for a particular sorting technique in which pairs of
|
||
adjacent values in the list to be sorted are compared and interchanged if
|
||
they are out of order; thus, list entries ‘bubble upward’ in
|
||
the list until they bump into one with a lower sort value. Because it is
|
||
not very good relative to other methods and is the one typically stumbled
|
||
on by <a href="../N/naive.html"><i class="glossterm">naive</i></a> and untutored programmers, hackers
|
||
consider it the <a href="../C/canonical.html"><i class="glossterm">canonical</i></a> example of a naive
|
||
algorithm. (However, it's been shown by repeated experiment that below
|
||
about 5000 records bubble-sort is OK anyway.) The canonical example of a
|
||
really <span class="emphasis"><em>bad</em></span> algorithm is
|
||
<a href="bogo-sort.html"><i class="glossterm">bogo-sort</i></a>. A bubble sort might be used out of
|
||
ignorance, but any use of bogo-sort could issue only from brain damage or
|
||
willful perversity.</p></dd><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="BUAG.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="../B.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bucky-bits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">BUAG </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> bucky bits</td></tr></table></div></body></html>
|