there is still no reference to the next-to-last linkwhose next field would need to be changed to null if the last link were deleted to conveniently delete the last linkyou would need doubly linked listwhich we'll look at soon (of courseyou could also traverse the entire list to find the last linkbut that' not very efficient linked-list efficiency insertion and deletion at the beginning of linked list are very fast they involve changing only one or two referenceswhich takes ( time findingdeletingor insertion next to specific item requires searching throughon the averagehalf the items in the list this requires (ncomparisons an array is also (nfor these operationsbut the linked list is nevertheless faster because nothing needs to be moved when an item is inserted or deleted the increased efficiency can be significantespecially if copy takes much longer than comparison of courseanother important advantage of linked lists over arrays is that the linked list uses exactly as much memory as it needsand can expand to fill all of the available memory the size of an array is fixed when it' createdthis usually leads to inefficiency because the array is too largeor to running out of room because the array is too small vectorswhich are expandable arraysmay solve this problem to some extentbut they usually expand in fixed-sized increments (such as doubling the size of the array whenever it' about to overflowthis is still not as efficient use of memory as linked list abstract data types in this section we'll shift gears and discuss topic that' more general than linked listsabstract data types (adtswhat is an adtroughly speakingit' way of looking at data structurefocusing on what it doesand ignoring how it does it stacks and queues are examples of adts we've already seen that both stacks and queues can be implemented using arrays before we return to discussion of adtslet' see how stacks and queues can be implemented using linked lists this will demonstrate the "abstractnature of stacks and queueshow they can be considered separately from their implementation stack implemented by linked list when we created stack in the last we used an ordinary java array to hold the stack' data the stack' push(and pop(operations were actually carried out by array operations such as arr[++topdataand data arr[top--]which insert data intoand take it out ofan array we can also use linked list to hold stack' data in this case the push(and pop(operations would be carried out by operations like thelist insertfirst(data