Docsity

Data science and algorithms unit -1, Schemes and Mind Maps of Data Structures and Algorithms

Partial preview of the text

Download Data science and algorithms unit -1 and more Schemes and Mind Maps Data Structures and Algorithms in PDF only on Docsity!

DSA -UNIT 1By:Assistant Professor

Ruchita Duggal

{\ oo ee aa nT aan @ 3% ! | ee | unt -| '? Vata Structure 34 ot \ | e stool th | We ws A porn Stouchuxe 16% a wo. Sb Ba We iF if | ze ol I ta used to Store and Ongar o} ouxanging aloa on a wm | / dared —affidently: | ! com be Qecesed 4 Up yf The data stowetwre fs mot amy prtog Xammurg Longuase Like & Cet,Jova ee. 9F tai ser of — Odortthm = thok we Lon 4se in any Progiony Language to Struchwe the date jn memory, Types | Data he | | shea) | r Psimitive dala = ston prornrive dale 7 un SHH oS crue « olive dolo opereuttl sie date) imi at ih ted 2 Uows 4 Sore only | Criminve Jota Swe U shpat pie Romrnny y The ptomitive late 0 ueture arte biu'mifve piu tve olata types, “Tne «nt, thar, floor, clouble anol pointer tu he poo} Oey . , MYve Sey Suu Shar Can bold Jngt€ valu, | Non = hmHve | aon pelrifice ds that tlbo| ‘4 pou Data SHUMA WH ( iat pe raipt data it me Nnon— pounce clea = gprutuxe 15 abtoled §=mte two type, | L kimea late tuntuxp 7, /L ‘ a jo er meer cleta Stucture mae OD a @) af x . fq RO date shat To ‘ i HS a type of cote ys SH, ‘ a re whew me fire 1s allocatesl of € JHtun time, Therifore the maximum Six ‘ el Plew'sie, ATM fe j id D | oe Ope oM any, a7 . . “The. _ be oc + Common | op miei fer. Com be bord peoes on +e | olata Stuctwne. vee, | SCovecbuing | mee | WE Can geonch fo any elemehd | In clovo SEM WE F Soxhing A we Can Sg Gosek the: linus “Ll a dato SHU wy thor han ascencling BY — plescunching Onder. Gn dun on |— naa we (fan abo trser -he nu, low! in a lato Stu. upd ation : We Can also update phe blimut he. we. Con eoblace tne elomuy lrth Another elem Scanned with CamScanner b L we con alse perfown tne old Operation +o Stemoe the etlimut prom Haq data — SAuwu. ; Weletion \o Deaverssin J “Draw owing In Data SHU —-rnaand - Syston ai coLly visiting Luety rns of tt. Dlaversr bce prow yn Which — Cah element o| a olata Sunt ts ACLALoA, Accessing an thir of ala, SHucwwt mean visiting ouery elowut ob Lesa once. Aljontinen ond Analyfis ae step by Step Solution of fase bhi. — TS Know n o4 Algo rth my Cw Te oligo buthen to add. two numb tntouc dy the (User [Stpi: Ste | Stepp, Aeclare three yarsales a,b and sum Step3: Enter +he valus of a €h Step: Add the voluw af a and 5 And stosee +he tesuttk mM Sum vouable, Fe Sum = ath. SHbs + Pyank Sum SHbC EL” step Scanned with CamScanner ~ Best Case i- ane Define the Input for whie O19 0X4 try tare Leg tre L. mrimumn Hme. In the — bust- CA4L Caltulakt. thE tower bowed af gn Abgemitnm, example: Ir the — ined — Search why Sau, data Is Petts ae he bt docation of bag dake th . : er the the beste Cause — Wort Cage 3+ Lehne the C19 0-H1-th rm rakes Oltuk, tmpur for tohuth a. ong WG wate 2 de rae, Hime. 9n -+the osu p- Calutkabe the Upbere | bounel a/ an Alposcitirm , ~ Av mtoge Case s— Jn he Avercege Case tak au KHanclorm Inpuls ane Compilation Hone for GU impus. ¢ then We olivice MH bY the Cotuclate the of inpur. Avetage COse = AU WNancl om bats Se ara a ne eg eee of Case Scanned with CamScanner 4, Asymptotic Notatrons:- Y folowing axe ane (orernonly ae Cyrmp}oh'c — motadions to Colusa =the Suurming time Comblesity ap on of tps 7 2? O- big Oh Notation ° OL - Big omega Notation > @- Theta Notation > 0 Bele ob Notation > wo rule omeyee Noto . Bi oh Notation, 0 - | | The ota oln) is the for ral wou fo expses he Ufpot bound of an algossthls sunning ime, | GE Yreaswea the wos — (ase time. coroplest4 Oy thé fongut Qunount af ime Qn aftorutn? Con possibly fuk jo coraplere- Big Omepe_Hetation — ag yo tit'on SL om) pon way Yo mae the Lowe bound op an al) goraithen’ sunt Hinne... ge Trucos pre bast (gle porn” Careppluilig, fe YA0 buh Qynouns= of One on ad goraitton (pe Possibly pac de Corp Jae, ; { Scanned with CamScanner yar Jean m Ls —<—<—$———_—_>=—_ In mee sewuh we Ate of fach } an Urey / Ls+ one by one Aes tel pro See a . oh Wheahur it 4 olatraol Cltgnial 0% gHOw Limeax Se aseet abyo voowk ~ Sern element fy Ponstel ered As a. poterbred Match 05, the Key. Qnd. Cherkeeol por | the Same, - , Of on Clorntrd- 1S Gourd ogroal fo tne . ; Kty the Seoul 5 success pub g- the sndex df tach Cheuk sis. po und, \ a ' J=> pinto Scar cg: Comb) oli. te Cuemy Vl S 10, 50, 30, 40) £% 80, 2% 90,404 ————— ‘Bie TV Vn aie PR ICRESESESDAS ES Sth i- Sd orn he, fia elmer ()nolex 0) and compare kty with bach tli ere, eps Lombaruny Key with pita elements WHE), «Since ok equal the jtercorox. yooves 40 The Ne elim ad a potential amnodch Scanned with CamScanner A l9o.uthm | | Sib? 3 - ip izns got skp 7 Sep3: 0) Aciy =x; get step & SHpYs he fay MOPS Go +e sep A. SDE + fount elem Pounel of cubes Pune elonusr rot foord Be Step b: exik . Acw of Limeare Seahs | be used- [yuries pute — neo. fpearth Car of Where. ne Motoy H- Con be toh on qsocay — oes vor sluice any Qelolt Hana. menue, — oF 16 welh- Guitecl algorith for bral olorese. pl tose bosks of direos. seas \ - Lintade. Joarth bot & Hint Cov floaty of Ob) utheln th takes Id flour fur ry Clotobus: ENA - ; — Not Wuttoble for forge doe OC rer apt cloda type Scanned with CamScanner eg ar Loto 4 bin seh | pWifpowne Hos “ey a Ainewe Searicr Binary Seve bk Loto can be Cy wrolee \\Make shouloe be in Sgsdeel | Welty. a 2 Mul cborarstoral csptoy aio |). only Gingle db'mendloval Can be Used. Aviay wed Thineé Complecity, 0 tn) We Nok am eff CF wut omttheal | fo be resiel "true ba lsc | Abe 5 Acwds 18 slow 6 wou (ase me Lomploaity i On) : it / H 7 Bot Cos ‘dime od) | fiests Clumtnr | ¢: (serve! f ee Smal PP at ons | / ~ Bh | 3. Tine lorapleaty a) Clog n 2) uk foe Large smpuse Y4. als 5 Alcs ig foster, b Worst cose tynt, ormbled ms b fi op. ) > Best Centr Poupreced fox dorge “Sirs Case me edd thant Be b Scanned with CamScanner