<?xml version="1.0" encoding="windows-1252"?>
<node id="227926" title="Re: An informal introduction to O(N) notation" created="2003-01-18 00:26:59" updated="2005-07-07 15:09:36">
<type id="11">
note</type>
<author id="154315">
BUU</author>
<data>
<field name="doctext">
&lt;hr&gt;
&lt;i&gt;O(N2) says that the algorithm's performance is proportional to the square of the data set size. This happens when the algorithm processes each element of a set, and that processing requires another pass through the set. The infamous Bubble Sort is O(N&lt;sup&gt;2&lt;/sup&gt;).&lt;/i&gt;
&lt;hr&gt;

Shouldn't bubble sort be O(N&lt;sup&gt;N&lt;/sup&gt;) as you might have to process the entire thing once for each element, if it was sorted backwords for example?</field>
<field name="root_node">
227909</field>
<field name="parent_node">
227909</field>
</data>
</node>
