Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

0(1) O(logn) El Otn '09'!

O(r() O(f J

• Bert - - - - - - ~ Worst

Operations ,-:co-1 I>

ti I"'-'- ,
- Store 0(1) <.or"f (o,.,;ii:J,

- Search 0(N) N~Ob


r,o .
rf;t·
, if!'
- Add 0(N) .,._,,,..,
oU)-' 1 ,,r
J,-\ .,_,_ M11 av-
- Delete 0(N) J;r
\'lo : -i or" 0 ·•· ••

Operations
- Store '"-0(N) ~o---l s\ "'Jil.

• - Search
- Add
0(N)
0(1) •
- Delete 0(1)

o-••
Stack Queue
Methods Methods
Push ---➔ Enqueue
Pop Oequeue
Peek Peek
Contains Contains

Operation Enqueue

ueue

Operation Enqueue
queue.enqueue("b") w0-- c!-"J 1JJJM -t """"" "-"
~ irvJ; w i u ,u.,..,.o \r- °' (N.1-,J..
\,.J,,11.

~ " °"" • t· ".;,_., C

>
C

cm Jl
,!\ .
LLNK~D L-15T

0 SUBSCRIBE

" 1,., (iJ . . Q ••


string - - Pointer in List
class r-t lo·ll.nAAI
·~.- fNAtAfo~
0 SUBSCRIBE
Linked List

+'IJiJ

- II
Linked List Methods
Remove
Add to Nead~ Remove from Nead

Add to Middle Remove from Middle •


Add to Tail Remove from Tail
0 SUBSCRIBE
Adding to Nead

- - Po,ntv. D

null 0 SUBSCRIBE
Adding to Middle

null 0 SUBSCRIBE
Adding to Middle

ID 0 SUBSCRIBE
Operations
- Stpre 0(N)
- Search 0(N)
- Add 0(1) or O(N)
- Delete 0(1) or O(N)
Q SU8SCRIB

You might also like