Linear list ADT
:m
Abstract Datatype ( ADT)
Doubling Reallocation
:
stores a sequence of elements
- Abstracts the functional
when array of size h
Sabar ,
. . . , an). Operations:
elements
- f
a data structure
- verflows
init)
- create
an empty list
(math) from its
implementation
- allocate
new array size 2h
getli)
- returns ai
(algorithm / programming)
- copy old to new
sister
k.mg?ort:oxitn
tgfff
- remove old array
(moving others back )
- u
delete ( i)
- deletes ith item
Basic Data structures I
Dynamic Lists + Sequential
( moving others up)
Allocation
: what to do④I:p.im?::::?snumotitem
.'I÷÷÷¥:i÷i¥%÷:w7
.
÷:*:
- run. .
huh uh
uh
#fDegue(
"deck ") : can insert or sequential
: store items inan array
delete from either end
IT-a.la/at...an1
¥4 Stack
: Allaccess from one side
T P
En
nu , ,
(top)
- push
+ pop
""
skied;"%itjm
:
push
pop
eedeaueue #
← tail
engueve Itai ,
cheat
⇐;
I ↳
Doubly
: head - itJaJa÷Queue : FIFO list
: engueue insertsat tail and dequeue deletes Performance
varies with implementation
from head