Download Data structures and algorithms and more Slides Structures and Materials in PDF only on Docsity!
Data Structures Notes EICODING BUGS E]NOTES GALLERY Data Shwcture + Bata shucture ib Woy of organia'g nc . ae — OM dato tema omc velotionvuip to hota > Anything 4o give Intormare bach other. (3 Called Bota. “Types of dato, SAructore > Exe StudentName, Wuckent Rell no, | There are mainy two types of cata Structure > Representoditen of dota is BAructure. Called Structure. | Dato Structure Ex > Qroph, Arrays, bidt. f l Primitive dato Non= priminne Bota Yructure => SAweture dota Vrudure © = Sado Mtudurve = Bota + Mructure (oa an aber « Bata Wruttore TRO Woy 4o Yore rH ound ogen'ze data Ao that tt Gan | Treen raphy be Used El fiCrendly (beter Wary | DOWNLOAD PDF FROM TELEGRAM EICODING BUGS ENOTES GALL! Arioys® (6) * An Array Con be defined o& an infiube Collection of homoge neous ( Simi lar type) Elerumts. ' Arrey ove always Stored i'n Contetuive Copecific) memory Location, ° Array Con be Stove Mmultirle valuex Whith Con ke veferenced by a hingle rane “Typer of Arrays rabmae| pahese Arrcoy, Arrroys, A) Single Rimummional Arrays > T4's alto Known OA, One Wmenmonal (16) Array, » Its vee Only One Subscript +o Befing Ane slemmds of Avra . wa DOWNLOAD PDF FROM TELEGRAM SICODING BUGS EINOTES GALLERY Becloyation 32> © Aoto- type Vorname Lespreavion) . we Exe Int nom tel; chor ¢ CS]; Tuitaliying Ont- Wimional Arvey > Boda type Vorname [erpremion] = { Voluerg. st Beat mum te] = By 23,15, 6,908, § 10g Char afs2={ , 8c, 'b, ey. 2 multi; Meenwional Arrays > mul tebreni Arrrey VEO more shun Ore SubSerip! to deacribe the Array, Clemens, CILILI -— Wo bimumenal Arrays > Its vse tuo fed Bea SubScri'et, One Subscript] 40 repreywk vow Value ond Second Sueseriet to vePrernt Column value, T+ mary ue for motrix Rep tie | beclovetion 4u0- imensonal Aree Bota-type Vorname [rows] [coloma] a (rt nom [30 [2] Tnttralgahion 2-b Arrays » dota Aype Vor-name Lveusd] [Columns] = Lrlvag . Ee nom [day {4 3, 45, ct. Cre Bebe Phe Ret. ; wrod = | nufol} = 2 nom[te] = num [ily 24 now [re] 2S, me (ado Operations on Stack, (e) There ore two operation of Wack, {aPUSH operation beThe process of ik oO new Blement +o the 4op of Matk 1H Push operorion. . hain plemudt 2 odduing to Yack op ip incremmed by one, ‘Im Cone +he array ip Fok amd no new Chm Con be oddled ith Galle Stock full or Stack overflow Condition 2% PoP operation > + The pProtegs, of Seleting an tlemmnt from the top oF Hack \'p calle PoP operate, © After very Pop operation +he esp 'p Pecremnted by One. ¢ TF +heve 8 NO Clemut on the Stack and +he Pop Ip Revformed they, +hg wil) Weauit Into Stack Underflou) Condi'lion Stock, operation # Algorithm GD, nd > Stack hay two opevat'on, 1) PUSH operation > D Pop Operation > » PUSH Operation >» The process of Adiing a new blemerd Of the 4op of Hack is Colle PUSH operation buery PUSH Operation Top 1s iCremete? [Top = Top +1 © In Cone the Army 's full no new Glemvt "'S added . tus Condition 1A Called Stock Lunt oy Satk overflow Covdiition, by Ore. DOWNLOAD PDF FROM TELEGRAM EICODING BUGS EJNOTES GALLERY Alaosthm fev tert! sapactiden(2 He Ages onenee ido | a» PoP Operation > (3) she vrocls (PUSH operation’) | he = . Process of Relea ing an Slememnt pusty (Stock Lmoxhye) tem) From the top of Sack tp Called PoP opevah'on, Step: et ae \ | + pfter Every Pop operation +he —— | Stack Top tp decremented by One, Slop2 Repeat Steps 3408 until Top < marsge-), = Top = Jorp-! Sep: Rend Item , |e TF there "a no tlement On the Steph! Set top = toP+! Y — Stock and the POP operation siops: Sek Mock [ee] = item ip performed Hum hip will step 6: Pink “otk oyerflow” rreavlt fwko STACK UNDERFIOW Condt'Or. — a_Ph eperahioon 30 p Ss TePs2 op=-l yo deleted = pop filers yo sa fe) = i! Te QR, ¥ C/O +E%F/G R,¥C/D+ NEFIG Let > AEF = Ra R¥ Cl O+ RalG Ry ¥/CO + RalG Lek > [CD = Ra R, ¥ Rat Raley Ry # Rt | RAG let >] Raa = Ry R, ¥ Rg + Ry * RL Rg + Ry le+ ¥ RR, =Rg Ro +Ry + fe Ry Now Enkery tha value of Re, Ry,R, Ra, R, +#¥RAQ/ RAG + #+AB/CB/NEEG pomfixs (G+@)¥ c/a +e%Fle ope cin+eFle Let At =, Ry % ae Efele Ry xC/b +! EG Let er%= Ra Rx Cl Ot Ral R, ¥ Co)+ RIG Let Cd) =Ra QR, ¥ Rg t+ Ra] R,* Ra t Let RG! =Ry Ry & Ra t Ry Ri Aad+ Re Let Ry Ra¥ 2Ro- Re +Ry Rs Ry t Nous Evder th valuc ot Re, Ry Ry Ra Re Ry + (8) R, Ra & Ry F A&+Co) # RG! F ABtCD/ ¥ G] + Porhi'x Ex PreAKen © Avyeve pO Non- Primitive Linear dota SATUCTUTE. * T+ 1B On homogerso in whch new Elemmts are added at ove End Called +he Rear End and +he Existing Elerunt are deleted from other End Called the front End. eo The fivat addleck Glermmvd wr'll be the fies to be vemove from the Queue. that is the FeohOn Yuyeve ''p Cullek (FI FO) Frvst -n five+ out type Li'sd. ¢ In queve Every Imert operation Reor ig Incremmted by One = R=R+t ond every Releted operation front ib Incrememnted by Ong Fel * Re-l rss 4 me id er) 1 3 E mety qe ve DOWNLOAD PDF FROM TELEGRAM | EICODING BUGS ENOTES GALLERY wh, Collection OF élerenks, oe 2.18 ca0 _ (jel 1 1—1 QD t Aeketed Elem. Fret delete lo R2r_+ F=l Cele] oI f R e Deleted SeCond clement, Rea F=2 Operation on Queve —————————_—===a==_" 2S To tnaert an Elemnd in 0 Queve > Al 3°? QINSERT | QUEUE [rewSite], LTem | Steet: Initali gation Sek Front =-1 wet Reor= -! Step a: Repent Steps 3405 until Reoy < rmroxhze ~| Step: Reo item Step 4: 1€ fronts: -l tun front = O Rear = O ele Reor = Reor+ | Steps: et avevelReay) = Item Step é! Prird, G@veve ig overflow Lrsett om tle Algo — grnsenr (BUEVE Steet if (Frow == (Ceavsi) /. marvin) [asst 2€] Lem write qyeve is crserrflow + Grit , Clae: take the Value if (Front ze-l) qek Front = O Reoy = O else Rene =(Rears ») ht trast) [ASSign valug) Gueve [Rear] = Value, [end] “ sePare bert mand in Chredere Quese > Ce’ I BELL (Dota Hrcture) oRetation en Aveue © aren &y : gt Serge moriige = | Y Pear = i? Em yan. ° | | Je, de, 30,40 | 2) Bites Sep Penent R < mowbie ~ | -1< 3-] -1< <2 deve vy ) féctta, Reod lo fee -| ==-l gyue F=0 A=0 q [oe] = tem 4 fey = 10 ho[ J] ap) a) 40 5) sek =—_ —_—— queme [lof [/ say fro RO Rear < moutise~/ 0 <3-l Od Aine Read 20 4) if Fes] = Fl falge Slee R=R+] As Or a=! fs 20 Sra ae fzo0 Rs| Rear < mort} -| R= A+ Re itled §) st 4h] +30 IEE, Aad Renry < worbite-| a
oo CEE Algo > A DELETE ( Greve [ mars] Tem 1\ if (frond =-! =— ~ Write queue under Flow amd twit Ele. Hem Gluseve { front) f ( Front = = Reov) Set front = -] Se+ Reay = -! blag: fyont =(( fron! +!) y, wore ) Enh °F Stedemed | +» ftem deleted | a. Swit (—TasT 32 J 4) item 1 j |» Item 1'p Released : Linked. Liats ey e244 AEA cr @ Coma. VD f>=0 Fs -| » Abidked bist aa bintor data Mrvdvre, 1 1 > 20 tree A=-l Which the Elemmts ore ret Hored a+ Cowhguovs Memory LoCot'on. 2 em 2 4 L017 Gsy. = FS20 y A Linked List 1% & Ayrras mic, dota Structure, hem = 2 folae . a sk tse aps: queve ch Emey TH No of nodes py abt 18 TOF Fired tlae Fe flag qveve iB oard Can grow onct Ynriwe on demon’, 2 . ok _ Gath blemovd 9 Called 0 rade, Which 4) them 1, Beketed hoy two Ports. a0 ip deleted ‘nfo port whith ores information ae oe CH ound Poriwker whch porn to the next ae Fra R22 ere 3 - 2 = oie Vnto | poide — &? fer} a) item = 4[2] kno Nowe. ee (ae o Oreos OE op ime eT wee & met —————— Aavomtogss OF Maked Mite 45) 1) Linked lipia are dynamic, dada Structore: Tat Vp they Can grow meh, Shrink during te execution of a program. a) Eflicrent memory viilzation: Here, Memory 'B not pre - allocated , Memevy YB allocate, Whenever th required . And t's deallotated (Removed) whim its nelongey neeckeck D Twrertion ond deletions ave taney Omd ef Frevent's Th Prowiste Flenibihity m innerting a Bota item at a specified Portion omd deletion of o Bota tem | from the given portion, WD tomy Complex ApphCattens, Can be eomly Coxried Gut with Inked hots, OReKation ON Linked Li's: GH The Bowe operation 4obe performed on the linked Lista ove - D Creation = This operation ave ured +o Create o Linkedt Lisl, In this node 13 Create om Linked to the Arother Nock. 2d Insertion = tus operation rs used 40 Inert a new nok inthe Lined ligt. Anew nee may be Intertodk ye At the egrvnring of a linked bist, wy At the tnd of a Linkeed L1'p), A+ the Specified portion ina Linked 3) Deletion + Thy operation 'p Used +0 deleke on tem (a node! from the Lehked Lind, A node may be deeded fren > Begivvieg of o linked big wm Srd cto Linked Lind ay Spec'fied Potion ovwthe liad Lia.