Professional Documents
Culture Documents
Data Structure
Data Structure
O(r() O(f J
• Bert - - - - - - ~ Worst
•
Operations ,-:co-1 I>
ti I"'-'- ,
- Store 0(1) <.or"f (o,.,;ii:J,
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.
>
C
•
cm Jl
,!\ .
LLNK~D L-15T
0 SUBSCRIBE
+'IJiJ
- II
Linked List Methods
Remove
Add to Nead~ Remove from 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