Uploaded by Shubham Vasoya

Stack Notes By Anand Sir

advertisement
1.
Py1&on Dna Sncture
Data
is
sfore 2 Orgause, da ta
n
my
stouctuve,
Duch a 0ay 1G0 itCccld be usedefticiujty
Dit opma pertornauce
Dta sfauctue rmay be broadly
Coteoiged uto relorig ethom:
a
Denia Stprutue
Simp Da
Cxopoud Dab Spckuo
stauCtuna
a)Liuear Dah spdure
Array
sfa
List
NOTES BY:ANAN
STK
YoUTUBE CHONNEL : CoDEITUP
b
iuKed List
Non Liueat Dta putue
ree
Grap
Spl Datastouctu
Array Or List
Srople Dala spvCturd
Tais isn len
ochiw:
a) Liuar D
ctue
uouehiuked List
Nrn-Liuea
Tnoraph.
SUch
are
Csnaidend
dividod ujo t o d
6nssjs
tacu
2
SJac
Stacu is a liacar ctala sputtone wtiu is Ced Lo
SJoreelemaut aud TF corks
FT Lo (Hut 17 laMt
t o r LIfo (Lat au fiat ot).
tata
SpuCtue,ar ta
6uuuat is inseted at
tL
ad dele teol -fam lasb
wa aud tual'i S y
tt is Daida
i t works gmta Pabten O
fI Lo (fint 1u Last'oa ) meau tu elaiuou
a u i s zuseted atfsct psxitim coill se ceetd
at a t
LIfo CLat JArst oe) meaus
t
euueuttazt w
olhtd atfint
ziusated
atoill
Tu eal- t t eKpuuphs
a) Statu e bok
b)stacu á4 plate t
are.
NoFEs B:ANAN STR
YoUTUBE CHANNEL: CoDETTOP
NoL
a) Tusertin etratim u stack is caOhPu
Deletin epezabey un stau is Caloocs lop
c)PeekBhusat is Qu last userted Valu
d isplay
Slusut, mau display1
alOfta eluauts
a v a t tooardo tie
Let'a Cudershud tautio)
Suppoa
e
Mave
0
blauu Qist oud
Je
s f a opEatbhon;
1 Punh 3
o35
hat
Dekory
)Puse 5o
)
Pulh 75|
2 75
a
4) Purtu
2o
5 ) lú lo
32
PeK
Lo
3 20
3 20
o95
Peek b u t
75
275
2
o Ds
o 35
So
Displey a00
20
3 20
Popprd &buut
6Fop
6leia
3 20
275
o 35
Le's do Saci porqrau
4
pu (a,dataD:
a0.
7
3
NoTE By:NAN
SIR
|YoUTUBE CHONNEL: CDDEITuP
Q appeud (data)
paint'6leucut Punud Outcwsuy.")
de reroeve (a):
o
pop)
praint ( Fopped 11om= ",2)
duy peok (a):
on nt ("eau elouaut - ' , a -11)
do, dasplay (a):
or
rauge (leuCa)-, -1,-1):
Peontla L&)
-Waiu-
-
wtull TruL
Cuoie = iut( iuput ("1->Pru\2 Pop| ?-> Peak
|, 5- Ait | Ertee
4DrRphy
TDu Choice"))
Choiu == 1:
o furn"))
("Etu'Nauuber
tata iut (luput
Pu (a, data )
leu(a)
=O;
b
ut(Stat ndertleo-D..
elg:
")
emeve (a )
U usiu- 3:
lua)= o:
prut ('statu dutJoo... )
else
peeKa)
ei choita
4
leu (a) =
=
o
poivt ("Sfatu »dutou...")
diplay (a)
di Coica
5
brea
pmit (sug euoice)
NOlt3 By: HNANSIR
ToUTUPE (HONNEL: C»DE1TOp
ractxe oustim
haMe3 Cud
Daik{
Ctaiuiug
a dictioMahy
cWoNd
Ma
h
corfa pa-qtau,wite
o4, 6 studeak
Ke Valu paie
peiom u
Separate User odouod uchio
PloOiug
openatia):
n a u s on sfudut) ot5 tu
(
Kes
a) fur
valus maKL)
dichonany, ustau a CorvopOud i ug
s9eati tdau 75
shme
tu
Careat
g
b)opRDisplata
a
for Oupt:
R
Iftauunpe Csmtest ej
ANu':90,
Boß :89, 'ALI:G5,
S'oM' 76, 'Jni':45,
ToM: 83}
Tu
ot fu
Opt
ANU
ToM
BoB
ja dictiamam
be :
jrctun (auwuld
OM
roryau opoonkANDN
rOM 76,
"JAi':45, 'B Og':89, 'ALj': 65,
de puah (a, i):
a-appeud(i)
deb Pop)
or
1,-):
rauge(leu(a)-1,-
#
np:
4
90,
TOM 82
STR
ANAN
NOTES RY:CHANNEL:
OUTUBG
CODEITUP
priut(a pop (i))
or
fNU
r[il>=75:
Push (9, i )
G
el
Pop ()
Print( Stacu Onckrovo)
Practice usthon
hw a ist ontainiug lo ute got. You ueed
W help im Cmate a pbgrasCditG eperate
mit
&
a
dauedhuutiw E3
putorm u 5 u o r u
petatia bed m Qst
Ast aud push evn
lu
vesetu
o5
Csrput
aTa
wmeeg \ato a sfac
4 isplay tu Csrb oth stacl.
b) Pop
f
uupk:
keCeua
lit i
tu
Csoput5
taaupt
18, 22, 25, 3s]
N [12,13,3 4, S6, 21,71,
34,12
56,
22,98,
38,
Saue ooput:
o7rauu 1oph malebin
n- 12, 123, 34, 56, 21, 79, 98, 22, 35, 3e]
d4 puo(a.,):
:ppeud (i)
NoIES BY:NOND KUMAR
YoUTUBE CHANNEL: CoDELTOP
do remsve (a) :
riin aune( leu(a) -1 ,-L,-):
Pain &(apop(4))
- _ main
-
Ah=-.
Push(a, i)
aud Sir
CoDELTuP
f u e patkiu oh aboe tuoo gruun
T t yill be oKed n Board a u
bo
Plem Note
is Qu Da
CEaule
wo povgrtw) Aove beoutakpu
Dape auo c
tae Daup ateten oillema
qustio e O marksks 3feck ectiom
emeo(a)
pit(" sHack. cludoh/ot
Download