4.3.11 Construct algorithms using the access methods of a collection


A collection is like a linked-list, but the order of elements is not guaranteed so you can’t use .get(x) or .size() etc. Also different type values can be put into a collection and the size is not limited, unlike an array.
Collection methods in Pseudocode (which are alloweed by the IB) are:
• .addItem( new data item )
• .resetNext( ) start at beginning of list
• .hasNext( ) checks whether there are still more items in the list
• .getNext( ) retrieve the next item in the list
• .isEmpty( ) check whether the list is empty

here is a tool to test your code
https://dl.dropboxusercontent.com/u/275979/ibcomp/pseduocode/pcode.htm