Whether a secretary in an office, people waiting for an ATM, printing out work in a lab or organizing orders in a restaurant, some form of law, order and structure is needed. These three aspects combined form what programmers call a data structure. A data structure is a collection of data or objects that are organized in a certain fashion and contain rules. These rules include rules for adding to the structure, rules for accessing elements and rules for removing from data structure. In programming, common objectives include consistency and efficiency. Using these objectives as criteria, data structures are analyzed, experimented on and concluded about to help make decisions on when to use what. In this report a timing mechanism is used to time three main operations, namely insertion, searching and deletion. Different data structures perform differently in different situations. This is where the rules have the most effect. For the purpose of this report lists or data structures will be taken as sorted and searches performed are linear searches. After this experiment (timing), the results will be used to make conclusions, which will help with decisions and answer questions. Common questions include: What is the best performing data structure and is the performance consistent? Absolute answers might not exist but the experiment will definitely aid in giving a better light on when to use what.

Related Work
A stack is a simple data structure that uses LIFO (Last in First out) as its rule for access. Or alternatively it uses a First Come Last Served basis (FCLS). (Tokuta, 2008) (Langdon, 1996) It can be visualized as a pile of test papers on a lecturer s desk, the paper on top would be accessed first and the only way to access a specific paper is by going through the pile. Recursion can be simulated by a stack but a stack has performance limitations. One such limitation is the stack overflow limitation. This occurs when too many items are piled onto the stack, which uses quite a bit of memory and causes an overflow of memory. (Your Dictionary) (Mitchell, 2005) Considering the performance of a stack, the space used by the stack is linear whilst the operations run at a constant time (Rajaiah, 2010). Intuitively, inserting onto the top of the stack would be relatively fast because it entails one operation (called Push), same as removing from the top (called Pop). If an operation involves finding a specific item or place in the stack then it would slow performance down, due to the fact that it must create a temporary list, do its operation on the original list and restore everything again from the temporary list onto the original list when done.

if the list is needed in its original order. Considering the performance of a priority queue. . It can be used to mimic sorting (Cilliers. Items can also be added in between the list without going through entire list. Or alternatively it uses a First Come First Served basis (FCLS). the first person in the line is the first person to get a chance.Queue A queue is a data structure that uses FIFO (First in First out) as its rule for access. adding an item to the back would be quite fast. same as removing from the front. 2010). 2008) It can be visualized as a line of people waiting for their turn at an ATM. A singly linked list can be visualized as orders at a restaurant which are on a separate order but are organized logically. Considering the performance of a singly linked list. Intuitively. (Goodrich.e. (Tokuta. Any queue that takes care of items by priority or preference uses this type of data structure. i. 2004) Singly Linked Lists A singly linked list is a list of items that are logically separated but are linked in one direction. it is much faster than the rest because items can be added to the front and the back. A singly linked list consists of nodes. the operations run at a constant time (elemaniaq. the first node is called the head and the last node is called the tail. It is also used in computer architecture when servicing I/O requests. which contain the object and links. Most situations which have fairness and order would make use of a queue. It is a very real life related data structure. because it involves one operation. and new people stand at the back of the line. Considering the performance of a queue. 2009). Priority Queue A priority queue is a type of queue that removes items (Dequeue s) on priority. A priority queue can be visualized as a campus print queue that prioritizes the printout according to the position of the person. everything has to be moved. Its going through operation or searching is fast because it just involves moving through pointers. Adding and removing take a bit longer because it has to modify pointers. When looking for a specific item or place we make use of the same data structure by swopping front and back items. insertion is quick because it involves one operation but items are searched for and removed on priority so that might take longer due to the fact that it must find high priority items first. lecturers and post grads get serviced before students. Insertion is linear on average whilst removal is constant on average. Certain operations of a priority queue are the same as a queue due to the fact that a priority queue is a subclass of a queue. but this reduces performance because no matter what.

Results 0. Conclusions were made and information was taken out of them. head and tail but the only difference is the extra link.6000 0. Experimental Method Programs were coded with a timing mechanism.2000 0. A 1000 items were considered. and forward to the next order. times were recorded and graphed. namely the back link .8000 0.Doubly Linked Lists A doubly linked list is a list of items that are logically separated but are linked in two directions. A doubly linked list can be visualized as orders in a restaurant but where orders are done iteratively.9000 0.1000 0. it is almost same as a singly linked list but can take longer when adding or removing items because it needs to create / remove more pointers.5000 0.7000 0. for the need to go back to an order. Going through is easy because of the extra back link.3000 0. Considering the performance of a doubly linked list.4000 0. It is just as singly linked lists with nodes.0000 Stack Queue Pqueue SLL DLL Insertion Searching Deletion .

January). Part 2: The Queue. Retrieved from Your Dictionary: http://computer. Lecture Slides. Retrieved September 2010. G. September 16). AccessScience .com/en-us/library/ms379571( Cilliers. (2005. Data structure. Genetic Programming and Data Structures. W. from Scribd: http://www. O. September 27). Retrieved from Scribd: http://www. Priority Queues. (2010. B.d. A.Bibliography (n.). (1996. Retrieved September 2010. (2010).com/doc/37568448/Stacks Tokuta.yourdictionary. Stack. elemaniaq. from Scribd: http://www. C. (2008).com/doc/7359362/Priority-Queues Langdon. (2004). 09. Queues. May 14).scribd. Stacks. from MSDN: http://msdn.scribd. and Goodrich. (2009. S.80). T. Mitchell.aspx Rajaiah. Retrieved September 2010.