<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=Tables</id>
	<title>Tables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=Tables"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=Tables&amp;action=history"/>
	<updated>2026-04-22T15:48:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=Tables&amp;diff=13328&amp;oldid=prev</id>
		<title>Mark: 2 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=Tables&amp;diff=13328&amp;oldid=prev"/>
		<updated>2008-11-03T05:27:56Z</updated>

		<summary type="html">&lt;p&gt;2 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Here, each of the data structures already contain &amp;#039;&amp;#039;n&amp;#039;&amp;#039; number of elements.  The tables show how the time taken for these operations to be excuted once will change as we increase the size of the data structure (i.e. &amp;#039;&amp;#039;n&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
Retriveal refers to simly getting an element with it&amp;#039;s key or index, if possible.  If that is not possible for that data structure, then it looks through the structure (by traversal or otherwise) until it is found.&lt;br /&gt;
&lt;br /&gt;
====Big-O====&lt;br /&gt;
Table showing the maximum possible running times for operations on data structures with &amp;#039;&amp;#039;n&amp;#039;&amp;#039; elements&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Add Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Delete Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Retrieve&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Search&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Traverse&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(sorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LinkedList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;HashTable(low load, balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(unbalanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Big-Ω====&lt;br /&gt;
Table showing the minimum possible running times for operations on data structures with &amp;#039;&amp;#039;n&amp;#039;&amp;#039; elements&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Add Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Delete Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Retrieve&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Search&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Traverse&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(sorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LinkedList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;HashTable(low load, balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(unbalanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Big-Θ====&lt;br /&gt;
Table showing the average running times for operations on data structures with &amp;#039;&amp;#039;n&amp;#039;&amp;#039; elements&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Add Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Delete Element&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Retrieve&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Search&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Traverse&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ArrayList(sorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;LinkedList(unsorted)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;HashTable(low load, balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;1?&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(unbalanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;BST(balanced)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;logn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;n&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: If a hash table uses a poor hash function, it will be and behave very much like a linked list, and so was not included in the table.&lt;br /&gt;
&lt;br /&gt;
Note: The unbalanced BST basically has a linked list for the left child, and 1 node in the right sub-tree.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>