This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ” at
position “i” into “L”. You always need at
least one function that puts something INTO
an abstract data type. Sometimes you have
several such functions. The C++ function call is: The C++ function call is:
x = L.Length( ); 3 L.Insert(i, newitem); 4 Delete(L,i)
We need to specify more about the behavior
of Insert. What if we are trying to insert
something at position “3” and there is
something already at position “3”? Then we
move the item from “3” to “4”, etc. What if
we are trying to insert something at “3” and
the list is empty? We prohibit insert at any
place after length(L)+1. 5 This deletes the item at position “i” in th...
View Full Document
This document was uploaded on 03/31/2014 for the course CS 114 at NJIT.
- Spring '09
- Assembly Language