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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

removing a node from a doubly linked list

A

p. prev.next = p.next

p. next.prev = p.prev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

addBefore (linkedList)

A

p.prev.next = newNode
p.prev = newNode
theSize++;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly