You are on page 1of 11
A} BPiici racy China omah time /memany dace take ta fet au in ma ‘| ‘ 2 PRO cUbE the algesttKm)> a Probler | wt esse algorithm. : en thas . att di cuthe. algorithm inpuk:— > frompyter|: — 9. outpat ia y bn aba! Ltoudebevinine “cobiyh oa !goxi i ost ef Py i _ttyms of lime and -Spaceitensamed Cmeiieyy). a 7 a x eck 2 Olgosithms\ mainly in terms of sunning time bub alse Pin’ Seems GF memory, déevelopry efPort, ete Lp i edi Lanta, gis ti » ¢ ‘ie ¥J-Auioning tie tantly sis is the process of determin: slng—how Hime increases ag tye i720 ofthe problem Cinput size) increaseg. a in Types of analyst !_To analyze the given algorithm, lege need to know whith n pst the algorithm fakes legs bs iu ich inputs the algorithm, take rites oe a S|) Use 3 bynes “af analyst ijl tos t_case !@ Input is the one for i itt a WMI g the __Hlowegt + al Inada cage! Run the - oe ma L Ames, ———Lusios yAtPE_inpyts that coe Bom Sore 1 pebleiibitin that genteatet iheie_inputt tamper Weefidigedee sek va by» the mo .oP | trials 2 eras compatition of ae oe is oc olpieti et up Actine a Coo il Obyeckive measures ! | Eastin tines Mol ago ed measure as execution 2 Himes ave specific to (a par tiey Computer: i) No.of Statements ¢xecubed =! Not » _Sinte the ne. of. Statements Voriey coith dhe __px REESE Ona Style of the individwel- Program mer = ‘ i Tdeal- Solution! leh as QSsume re exjrves.s the —tunning— Hoe. of given foot Hare ets QQ t :Punchon' of the tapyp size on (ie. Bn) sw Compare the3.e- di? Peveng . Functions: “SJpeess Pee ROREEAD I etna: eee this Kind SP Cormpgxisen is lindependend of trachine Hine, prayioms wring Style, eke hints. nale én nate_of great. ox ooite— 18s Note -ON* Asya toLic “nota t's, <2 at} Rate of Girosath ! The vote at cohtch the ~ J—tine —inevea ces ag a function of input is catied ‘ote of growth‘. = i Toke) Cost = cost of cay + cost of bicycle _ Yotot cogs. © Cost of -cori Pr: oxi ation’) a)__Detreasin ¥ofeg of Otreuth to ; | 2” > rbot yah nt Yaleyin 2 199CNL) PHD aI > | 15a) 5 > ire PD leg begn > 4. \ 3). Agymbolic Notation! O_ Hows The fapxes.tjcn fox best ~ Average Gnd worst | vee Cage, fori alts ty. Cases we need te idensity —$he_Upper_and lower botnds, ——@_Big = 9 Notation Cupper Bodmding funn] ——__2_This nosetian. gives the 4 Hight bound of the giver nae is aepresen: kef—as_ftn)= OCgtny). Rete oF Giroadth 2 Olgtay) Fay thee fa Lexi gs. positive: Congtank © ‘T}: - FR) | and ms Such thet 7 am“ 1 O< Pn) cg ty) Port 1 t ae : Eee = 4 gin) is asymptoric dens [Pp ———> tnpar siz, Loohich gxe tty then 0» equal 4a gists algo i Ma i yake of greats, Vink teS a1 ll Big ~ Visutiza tion, u 12 Big = 0 Visatiza a e | Og tn). isthe set of 17 taint eg eee a & | same, ondéy of igrawith: asi gfn). ample O(n?) includes 0(1) oth), 8 (ntoqn). SHO as Mb oliver 6x eee Trew boun ding funcln] Ate bstenr 7 Netetion | co the Jowitr- bound oY Sind 8 Such tha t / | le fe ecytny SPN) For ott t IT o Wa | NZ no iL? ‘ ‘i {___| __s gin) iso. sy mptoh'c a = taht v fore a ea at = 6 tka “gine axst, begt, ave: yeas exe in every Case fox _a_giw Funct Pn) ese ove Sey tha do Pind another Funct? g{n) cahich Pin)” a hitghe Volwes af n. * . fl | @_measg (40) js also Curve: which Cin) ge I) “Wignes Volte of Ne dintd @tn mathematics toe’. cul) such cue. « 4} O3ymptobic Curves di ath eg: brn ghia) i | O3vinpio lc curve Per Pin). g—. thts vearen a2 ca algar th _Goolysi's = A5Yimigtahic Gh alyoys. Choracteristicg 6f sigarith py 2 <= Zl = ‘| he Ymplementeds ini Guy lam suoee . ond the eee = On pb Hl esa eagle \@D There ave fame Chara ctévishishe eohich eve Dol geritthn —-ghauld Ps Mote — J aaa i : i@ = the axe 5 different chavuctsyistishy | a two i pert OL: alga 1@) They: oti 1 as i Beiesare 1 : ——G@ Input specified t If of algorithm ays te toke insta: sa. Should be cleor that cohith type OF jnpuk In cegsing - Le aequired: “Par puoicegsin : — Sour sispecified | Alganithm must he G@ Linitness 3 “Diy should not end in infinite losp. Se) fros icon he lmptementedeln ah'y lengauge And yet the outpus Will be sa os Cxpected (@) Sisace: wequired 40 complete taste 04 thad cleave define thal te! GS Hal vequived to Somplete task of the “aly LC Myre Comps temidy ) i i @__Debiniteness @ bse. GE) EPP P Liveneos. b 8 { ats “C-Spdce ‘comple yily) : 4. There ort kao Key types of pl pia aa —— taken Leste Se dagen Staaf pbisulon instance Of dhe Problem fs decide Jirtn the Getofelement v of U whether V is in S, by A funct™ problem Con sisky of Puno 2 Poem o Bek to. Set Yu Dn jrgtonce of problem js. hae ceommuke giv clea, 1 ior A Oy | fat 4 1 nackies q NG 4 212g panda’ ng ele Flo) vig i uy] Estim atin q kime / mo. of Ste yo ose ecublon op popper i o Dita cotcubate Xe dining Hime : Prag bre! mayimum — sryp tral _Neahed ten pethad_ga-sbboinegtscn | ifteant. porbien of dhe inpad Si tieSime afpaaliten aah ae. “meshed losps_coheve the Outer loap_ gacs Hhoough on input mn’ cohile a the jay loop — ge asiy he PE tye aca iii). The Hime cna “iA Such Casesis O Cnn). Q.gi thet is dete: gtructuve 2 What ave ify types of data Grruckuve +> i Mugtrate stuith the ex® =P] Data Shackure tiga ee ——-ond organizing detain Computer ge tho ib i. eon be sed sefPiciency.: stabi kU a A_data Structure {5 a Special: forniot for i Ovgunizin. and Storing aig a) Ghenes ot dake six | ee Peleg linked lista, Stscke ee aph$ oad $9. a sD} pep ding on the Orgenizathor p- the elements sat date sho ee ee 5) Lineay = ~ data Structures! ~_ Blenends dre! accessed tm Sequential Grdey bub Lit ts Com pul sory. te phere aN eltmenks ——Segsentistty Gt bx dinkeds lists, Sticks sad Queues] Oi Non linear data. Structures! be Ciemonts of this - date Stuctuves are) Stoved) _ —Atcessed cin nom lineos sorte CE Trees F pews] YP Rbstrace Dats Tae (ants so. Leal Abetract date ty pen + 8) ADT con sists of 2 parts: G) Declaration of date. —_@D Netlavatis, of Operatto i , used PNTs inctude | Lt, Stocks, Quewes— Priswity’ Q. Bree, Oi chionaries ,Hossh Table Gye aph:s me : oo DATE: biyite a pofe On —1-D cdind 2-0 Qriay Array 1 The most bagic §tvuctyye fox So ating ond access ing 8 collection of data. is called dysay, 9 1-0 Array 1) 3-) Oriay Stand fox One dimensi ional avray 1=p_aaray js collection of Coptiqueus elem emits (dots) in chich individual e@ tments ave idenlified by. q I Leinique inde nymheas ee ee ii)| index no Start ity _O.. — 9) | Once on assy is ented ibs sis e—can not_be_Chenged. Size element ilk each element initalt o_mone . size musth thn Zero SD /Hength )! aetuens the length ox 0.08. element in _ovvey, —__ViD| relurns de value stoved in _orysy of elemint pesilien |index-__getitern Cinder). ___viii) || sebitem Cindex, value) ' rrindigies the S$ oF arta) | element ct pasibion index 4a contais value, | Clearing (walue) : Clears the array he Seb Hing eutey Cleimend? _te Value. =a -@-2'5:|_ sempre \=D_seray Consishing _G _eltmead yo | 51 2 | 4 & ° Eee q a 2-) Atreyt ee 7 ono f _@-egery Rriajncet Ovqanized into yows and Columns. Trdividuat elemend ce _vePerenced by specibying the Spe ifr reo tind _coly 7a L __ Sted qijh 0. DATE: Ww) |Array2D (mxois, mols): Creates 2-0 ars y—Orguinized inte nesls . ye ee yews oi qumend: indicabe L yous columns. ond 4 ize of table, inddtiuel ele of the “toble ase LJajbialized do Mone i WL a dogsRous-C) ! mebuens Dees go 9k vows «i VAD] noi Cols {9! yelaans dhe ne! of cls i 2~p yr. vi) leer Cvatue) | cleoas the ary boy thang cach ele de give _velues Sie gebites Cijia)! geluens the Value . ary ele ak pesthtes Hin dicated the 2-tuple @ _2°- Dosw tered i a=. Ciiaigye, G — — o ( Dm 3\ Bo gu ola gs | 32 4 gs. St tl SL se] 53 Go al eu 2 | 6e cl Gu a. 2 713 Bu ft | S73 ‘ge fo 83 41.8 | 92 | 83 vy aa Sila | 7 | 23 © Getored in peye File) LL | Iavite q tote on Bk ek data Structure | SJack 15 an oydex Ligh in ccohich ingeition & deletion }_ove done ot end —calied d2p. Prot in taal oud. Q.g a] 2} ask tated _i5_Fisth one _to_he deleted 3 lwhen ele fs fnserted in — Stack ,this_cencepk is called — push, and ele is Sa°™Fd Don stock » Da called psp Rushieg? popety ? uJ : (a Ee - repictc © cf dep. 8 B B Tey Ink Pop 0+ removed data Prom Stacks int Top 1 Ret Inning lost ingerted ele cil ide int S170)! velusms ‘neat. ele shored in Shack y| PApplicandion | @ Bolasciny 6% Symbsl 6 5] Operations | @ puch Cin da Ja) ngots dela one alee @- 6) —Q) Pin fix ta _pasafix—converiton @ finding 8 of Spans @ Evaluation of posts @lnpters tins nk calls (QD_Matching Tags in ATRL ——i}| Bdvontages 1 © Fasy implementation ®) Kat access Hime, @® User rn Covnpiles design ©) Hep" Helps i'n fmt coll 4) Drsdedy Qisedven tages G) limited capacity I@_ No vendom access _(@)_ menor monagrmend. @ Stack overfles and neler Pk @®_Lecursive funct® celts ti'mi bation. DATE: Note sn [igh clade Shyu chuye- Z Successive ele are connected by pointes (Prep) of data t Plast’ ele points! te wut Di Cay be mode jug oa long as required woagh J 2 Does not coe} memor Space: 7 © 2}| Operation !@ Insert! insevk elem fyte lishe D Delete! removes Specified ‘pasit® ele From Iish- Delete lish: Vemsves’ all elem of ist. 2 Cound: veduenieg Mes of elem ia liste @ 5 |_Advee s ty can he ¢ in Constant mer Due con Stat with Space sJusr one allocated elem |ona_odd on neous elem eostly quithouk need te de any copting 7 (aoe pee: Bees time to ind tvidua]. element. aryay {9 7a, Jom -atcess which meava ih Jekey O(1) bo acces aay ele fn aeray, |@ list ave hard te Manipulader ®D _Wsts waste memory ia deems OF emteq reference POS y &\ 0 ted — B= [ef bap bie Ney @ [Bpplicabions: @ Tmplementation of stacks / Iveco. IQ) Dynamre rmremory allecat® Pasty Fal arin d lrectory Of pames. }B—RKepresenbing sparse pa tces 9

You might also like