Ch 3 Lists Stacks Queues Flashcards
1
Q
Abstract Data Types
A
Set of objects together with a set of operations, ex lists sets graphs along with their operations
2
Q
Iterator vs iterable
A
Iterable: interface
If you include iterable you must provide a ethic iterable
Iterator: interface defied in package, an object, stores its notion of a current position
3
Q
removing a node from a doubly linked list
A
p. prev.next = p.next
p. next.prev = p.prev
4
Q
addBefore (linkedList)
A
p.prev.next = newNode
p.prev = newNode
theSize++;