<?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=SE250%3AHTTB%3AArray-based_Lists%3AIntroduction</id>
	<title>SE250:HTTB:Array-based Lists:Introduction - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3AHTTB%3AArray-based_Lists%3AIntroduction"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:HTTB:Array-based_Lists:Introduction&amp;action=history"/>
	<updated>2026-04-30T12:18:13Z</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=SE250:HTTB:Array-based_Lists:Introduction&amp;diff=1868&amp;oldid=prev</id>
		<title>Mark: 8 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:HTTB:Array-based_Lists:Introduction&amp;diff=1868&amp;oldid=prev"/>
		<updated>2008-11-03T05:08:42Z</updated>

		<summary type="html">&lt;p&gt;8 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{SE250:HTTB:NAV:AL&lt;br /&gt;
|prev=SE250:HTTB:Array-based_Lists&lt;br /&gt;
|next=SE250:HTTB:Array-based_Lists:Operations}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
An array-based list is a data structure that stores elements in a contiguous block of memory. The end of the list provides expansion space that can grow as new elements are added.&lt;br /&gt;
*The capacity of an array-based list is the number of elements in the block of memory. &lt;br /&gt;
*This size (or length) is the number of elements currently in the array list.&lt;br /&gt;
An array-based list can be made of any data type using structures (see ABL Structure below).&lt;br /&gt;
&lt;br /&gt;
The new elements can be added into the expansion space in two different ways.&lt;br /&gt;
*Put (inserts a specified value at a specified index).&lt;br /&gt;
*Push (inserts a specified value at the end of the array. (see Insertion below)&lt;br /&gt;
An array list can be resized by altering the capacity either by multiplying or by incrementing the growth capacity (see Dynamically resizing array).&lt;br /&gt;
&lt;br /&gt;
===Real Life Example: An Absolute n00b&amp;#039;s Guide===&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #666; width: 500px; height: 400px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;embed  src=&amp;quot;http://www.orlybird.com/SE250/HTTB/arraylists.swf&amp;quot; height=&amp;quot;400&amp;quot; width=&amp;quot;500&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Created by: [[User:Sshi080|Sshi080]] 21:11, 6 June 2008 (NZST)&lt;br /&gt;
&lt;br /&gt;
===ABL Structure===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&lt;br /&gt;
&amp;lt;IMG SRC=&amp;quot;http://www.geocities.com/braydondunnit/SOFTENG250/1.jpg&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/HTML&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The structure of a Array-Based List is defined by the following code:&lt;br /&gt;
 typedef int element_t;	        /* choose your favourite type, int is chosen in this case*/&lt;br /&gt;
 &lt;br /&gt;
 typedef&lt;br /&gt;
 struct {&lt;br /&gt;
   element_t *arr;		/* a pointer to the start of the array */&lt;br /&gt;
   int capacity;	                /* total number of elements available to use*/&lt;br /&gt;
   int length;			/* number of positions used, ranging from 0 to capacity */&lt;br /&gt;
 } ArrayList;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{SE250:HTTB:NAV:AL&lt;br /&gt;
|prev=SE250:HTTB:Array-based_Lists&lt;br /&gt;
|next=SE250:HTTB:Array-based_Lists:Operations}}&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>