Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
57 views
27 pages
CS Practical - Compressed
List of
Uploaded by
Jacob Davies
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save CS Practical_compressed For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
57 views
27 pages
CS Practical - Compressed
List of
Uploaded by
Jacob Davies
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save CS Practical_compressed For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save CS Practical_compressed For Later
You are on page 1
/ 27
Search
Fullscreen
Et a s Grete 4 eqzam to iAsest | Atm : | Aasde ‘inte linked trot» Algowithm —> Peocedae Mode (NODE) _ (node ‘is_not fednd_) | @ Te (Avare = Nol) “Pint “The _memosy bank does oot | contdin any __Feee nedes '! zetuen (Nuit) else [Feee nodes ave availble 19 +he _memovy bank se aie zeach_a node oF sequined sized @ PrR = AVATL ——> LINK @_[&easching a node of vequised seize To the tinked Mat] Size in the _ifnked Uist J cinile (( Srzeor (PTR) + suzeor (NODE)) and (PTR = Nutt ))) EGR Eke PTR = PTR S EINK. end while [Free _nede of given size ts found J . Teacher's Signature... rnorne= =a @ ee (orzcor (PTR) = See (ove) a pred —> bENK = ee cee LES rebusn (PTR Else [Point “| Could not fiédl atiock of the 6 zequived_ size rvetusn (NULL) End TF Eod if |S Stor i Description s-=tf a feee node of aequived size To avdibable 10 the memory bank then =the. it | ‘ingestion 1s posible orheswise q@ _oode connect _be Sobes ted - _ Trig peoceduee bo find 4d Foee node of ‘table size feom =the _memorr bank | = see Thote ll succese fully itn | ptndingll' dl inoue | of euitable size than Tt well make —the ned poinkes= point it dleo fow it well petuam ALL - have studied i Result $- ~Thus ) we Hew to insert rode Inte aq _finked list «Gitte 9 peoqnacn to_create. Insest + aa Sxcular linked lot - elete a node in 6 a || Theo Oe Tr Ie oy Rigestthm Pacem TLN serT— 6t— AN areT KEY ees = Set | @ re Cred o/Nutt) then __Peink neuFfrctent memory ¢ AQede _cannect __||_ be ‘insested Exist @_ Else r _|| pre = HeapeR, ——> EENic Gihile_C(( PTR ——> DATA = KEY) and (eTR— crnk - Nutr )) do Pri pape EEN end while . (pre —> utwe = uct) then —— EW — > EEK a LTR LiKe = NEG _oew ——> Dem = x PTR. —> LINK @) Else || __Poink “key nok found ‘Teacher's Signature .a - oe Deere sulky (ists KEY) ~ Cist ts empty] a [Oe (HeAbeR > tone = Mutt) then I} paint “the list 16 empty 2 Deletion Net possible “ Exit || ena ie yy | Crnittaitze the poimtes- pret and pre J @ Pre = HeADER 2 PTR = PIRI => WINK CSeaxch For the location of key J rt |@_Gihite (PTR + Now) do HSE Crr— Dara = key) -then PTR 1 = PTR key 46 found ct face mode |a ee eerie Shui) le ee [rreoe Ware shen aod ete RT pret -——> LINK = NOLL Retuen — node ELe = Rib. ea ble __||}@ Else A Ckey 14 found sémeahese io the middle J te 2A |@ ptr | —> ttn = Pre — > EENK Retusn— node (PTR) [exit [| end iF end if end while [key mot found ] “EF (PTR=NuL) then Paint" nede eith the key does mot exist | _Peletion mot posible " end iF + @_&top - Dp escviptio ns A__civculae linked fist is q | sing ule fined Te Which =the list ede 4 peinting at the fivek ‘Teacher's Signature ,|| ede to stread of Mute. — IF foee node of weguised ize 18 “available the memory” tank then _ooly _ ts possible st fet Ys empty _ then fot _poseible 5 [Re suH-_& pl = = I _) Saints ae have Studied i How-to caeate insert .« delete q node in ciscutas~ linked list| = aang | Practrcar No.3 ae ’ Penctzcar No.3 _ a eee aon es _Chatte uah a Cite 9 Peeps — ee element ‘inte __ Fs _4. cere ars ssi inked fist “PUSH = LINK stack (Corack £ThM) LE THODE (NODE) |@ IEF (neq| = Nuk =) then pink \ Memory is insufficient & Not be Fnsexked ovarflew, occused 3 Mew Nede ox « exit |@_ Else — J neal —» Dara = CTEM || iW] meej —> LENK = “ToP uw) Top = New | iw] Headex— Stack — LINK = Top le End Ff @_ext .0 eR ge L ’ Algovi-thn SS ee) ee Be ee are ee ss, papa Tk osha era. © _ =F Tee = Nutt print “ stack ts empty § UnderPlow accused mu o :
Nk = PTR. w]_Rekiren (oun): @_end TF @) Htop 3 Push () $ =t Ynsexts an elements +o_-the op of the stack + — Tt jo -+takes Ol) Hime, as each node jo ‘Tnspsted at -the level top of linked Met + Pop () 8 = zemove aq_elements fam he to ab the Stack: — + takes 01) Hime » a6 —the stopalways push Stack GANOHI — xa no and pop of implement pe “newt iincerted node points _-fo —the Ue tudied _taw —to , Studied _ tat = stement ‘into Faom _a asi Ninked list + ng _ oeGANDHI | Aim, - Giile_a paoquam -po solve _-toces” of i = A a > ry &g i _____ Hani foe using wecyssion + af @_cfile Bega —> END _ Renee _fend of the Stouctuee ] Ia beers ofa dtsks 5 = From pen AUX to call —y8eieR CI 1AOK ) BE@ + END) E j Le eae :GANDHI AGEN 2 _Discxiption = ? : : Tatieo- of (uqnol = (ord ma thematical sia | puzzle ashich__coneists SF thee ||_ owes (pegs) _and main —the one + Tl Sines 2ings A _diffewent sizes and | qthached upon 640 as cending i odes - — “These ave other coovtations of ~the uzzle ewhese —-the numbes of disks jnevese but +he —fowes count zemain -the Same . |— “The gules that should be followed chile Solving the problem ave , f!, Only one -+op most dist can be moved at a time . J|__2. Ghile placing the disk on peq 1 smallex disk
——> LINK PTR = FRONT enmile (pTR.—> tEnk Ae HuL) do PTR = PTR — GENK eod_ aihile 4 ea —> DATA =—TeM prR — LINK = NEW NEW ——> CEHK = NOLL REAR_ = NEG| Aiqostthm == 7 : ray pean + Xen) D pre = Headew >» Link sie e @® tC tink Queve te empty 1 ( pre =Hpet | _ | ee TR = Hypct oe “Deletion 92 4 prok “te Pueue ws _emphy posmrble nt end tf Chee ie only one nade in the pueue ) (émerty —> CINK =Nui) | _ |e ss (pre + net) aod —> DATA Te = FRONT Header ——> LENK = Nuc Readesr— node (FRONT \ A) else |e) [ Queue neo a Sumber of nodes J pre 4 sf RONT — pINk “Ete =. FRONT -—> DATR Weades- ——> LEENK = Pree Rétuan ——> ten = PTR 1 ce(Cy (@) top: Disexcption 2— @ A queue. 45 aq lined dated IL wotouckhive om _ Orr Yabotoact datd stauctuse I having oadesd Blements_ of similae data pean eath ‘insertion fakes place oF the aca “end @ The queue and deletion +tcikeo place at the front end of the queue queue Jo a froear cata _stouctuoe wth some vestatctions imposed on _tk- Gy ~The aestaictiong axe ineertfon —takes place et one end and deletion takes place at —the _othes-__end - @ fi queue ts an ordered {fst of aurni la data element + @ “The end at which elements are __inseated called REPR. Tq called ONT 19 (Fro) _tigt fest out That %& element _wmch entess 4 uegque Cook ee in ehich tt leaves the q weue , << ewGANDHI) PAGE No: (15, ueUe go oo oS @ ~The element “thet: Fe aantting: 1A the ¢ SJ enh oe one that 19 fox the longest -ifme te the = S) deteted Geto @) —The New element _aleoays 9199 the _queuce at +he end (@_clo_elemenk can be~ enteed ‘into ow clele ted foom —the middle” of the queue - (2) “The _lnses}ton _aldootthm sill Insert a nede In the quecde at the REAR end » (@) Sot ts asumed that a CRaetie te 49 the fowm -f single finked tot and 15 citweady pocsenk Sta fhe memooy + Ceoult 38> “Thus we have studied how +o pesfoom t to Yasestion and cletetion ind _quewe in Static _Sa- Teyplementation :dele tie) ee J opevation of _crowulaas Algeaithm 3 Le cweretT) (Pueve 1 FRonm 7 FEAR: eM _S6rZeG) XP (front per +1) then, paok Queve jo fall © —ihe | exit f eloe Quer ive ‘iis Em phy a uF pean =o) aod (PRONT so) then 2 FRONT = REAR. =1 Elce, [E@Pueue how some elements | & KP CREAR = SEzeoF and Front =e 1) REAR =| Fibe REAR = REPR Tt] end if — CQUEVE (Ream) = 1TEM End “Ff tnd iF Teacher's Signature ...GANDHI PAGE No. = mo of Practical sp. Step: oe = CQeelL ere mCOORe See eonn eens Teer) Sree. De 1. ote ChRSNt =o) nem paint wcpueue~ is SOY 0 Else e j [Lease 2 3 ueue has single element Si zg. TTtm = Qveve = REARS FRonT =o RERR =o Eise [cage 3% Dueue has some elements J an ae FRONT = 4ize q_ EFRont =1 else FRoNT = FRONT +1 4 end Tf =. end a 6. Rrop Teacher's Signature...PAGE ND @ Disestption 8— Oe queve a Full hows the altaned 4a Maximum size the Stashin' location oP the quere are. emnphy and hence Sas of memory @__f_dovrma _quewe can Fneest elements until = } queue becomes full Z @ A cCiacutay queue like zing and stat fi ra 7 } Practical fhe quewe The Fuctt (5) “The pointess FRONT ond REAR move TA clockwise dizec tion allen -the location as queue i cisculaa e Cteculay quewe fo q jineaa dala _stuuctuee jamemenete operations ave performed on Pxot IN Flash ouk painciple Crirro) and the last _pogition ie coMnected back to the féost position do make a civele - @ the ingestion ON aireuilad queue atqovithm _iAsexk on element Em inbo Vie CrRCULLAR Qurut c8 Size SGIrZEQ , ve & FRONT poin 5 points +e the Eeont ead And REAR. _poinkes= points +o she zreqa end Sieha 3 CQUEVE . ni Teacher's Signature .....in +he PUEVE - A mM. deleton 159 ciaculao gene aigosrthm _cleletes on element fxm 5 5 fhe QUE VE of size sizeD oo (@) FRONT oinkes points +o__+the a } Desukii Sis hey mere Pune Steudted in perform —_iaseation ‘cind deletion operitipn ON cloculas Jue le tal LE ob my t a faeGANDH! po tn: (73), $ ae) ot oF) cipdcy Prrerrent “9: } | | athe PJgori thm ‘ je J reestion aor lk (AUN) 1 A cod =o ae og. 1=2N pti] 16 ascumed to be santed Se j compapision staste from _Gecond _elemen? of _avaay + t 2 cinile Cig) do ' femp = A i) eee i-\ th Fe mle (temp 2 A imend y 7 = i) pterR Hy = afetri a) PTR = PTR-I iL 4) end adnile . a [eTR +1) emp Santee 4+ epk while =r are anPAGE No.2) h peciption 2 O peoaeechonmecsr Be cere We similar to. the aovting _algoaithon that works a ee a tqnde ia fou™ hhands- QB) —The _a50ay is TaBes Gt an imo 4 ‘| gooted and an ungosted poor * (a_Nalues from Awe uneosled past ave picked in the and placed ab the conaeck position coated Gol - @®_—The seated pask contains —anly _—the _fiost “element 2p the lieth 1 while +hé Ws ob the list is in the uneosted list + () “the ajgoa thy then _theaates +hoough each erements ig he unsoated aah picking one ak ad Hme and insests ib into its conoect position in the souted pact - @) ~The algoaitin compdses the cusme nt = Jo Lil element with each element tr the Soaked past 1 Stavting foom the yqht - most Element S d 4 Result 3— —Titis 1 we pave studied + bo sost an sans) sing insestiorn soo} -e”™”-—( Wlhthtt~C~ GANDHI proena. (22) no ond ee ees Cite _q_pooguarn te ingest AN pine es - seach faee and Foavesoe hein) poset of Practical (ome Plgostihm o= pesdverea Tenfo: Lert » Right S poor] 1 Sep oh) Se STAC eS wens and pir > ROOT) Taenikaly push HO Into stack and PTR pofiter te the set voot node of treed D+ Repeat steps | io S while PTR =p qUeL Shei he Saas ago CPT] ay. {Handing eight child J aes = CET RIGHT CePTR) = HULL +hen Cevsy night node onto srack | ie ie pao eee) is Steck Esor] = great? Cerri end ih + s+ Grand ing’ teth child J ae t Ty lett frre ) +e Mult then et Pie leee Gane | elso (Por foom oe A See ee |EOC )h3$/U — 3Sti—
You might also like
DSA Hand Written Notes
PDF
86% (7)
DSA Hand Written Notes
32 pages
Dsu Notes
PDF
No ratings yet
Dsu Notes
110 pages
DSA Notes MAKAUT 3rd Sem
PDF
No ratings yet
DSA Notes MAKAUT 3rd Sem
13 pages
Unit 2
PDF
No ratings yet
Unit 2
30 pages
00 Linked List Handwritten Notes
PDF
No ratings yet
00 Linked List Handwritten Notes
22 pages
Maha Revision DSA Gate Wallah
PDF
No ratings yet
Maha Revision DSA Gate Wallah
71 pages
Data Structure in C
PDF
No ratings yet
Data Structure in C
13 pages
Dsa BCS304
PDF
No ratings yet
Dsa BCS304
29 pages
DSA 2019 Solution
PDF
No ratings yet
DSA 2019 Solution
34 pages
DSA Beginner To Advanced Guide?
PDF
No ratings yet
DSA Beginner To Advanced Guide?
110 pages
Dsa Short Notes
PDF
No ratings yet
Dsa Short Notes
37 pages
Dsfs Record
PDF
No ratings yet
Dsfs Record
114 pages
Organ: Relatronhip
PDF
No ratings yet
Organ: Relatronhip
38 pages
DSA RG 3rd Sem
PDF
No ratings yet
DSA RG 3rd Sem
71 pages
Data Structre and Algorithm
PDF
No ratings yet
Data Structre and Algorithm
109 pages
Data Structure Notes Part1 Csegyan
PDF
No ratings yet
Data Structure Notes Part1 Csegyan
25 pages
Chapter 2 (DS)
PDF
No ratings yet
Chapter 2 (DS)
50 pages
Linked List
PDF
No ratings yet
Linked List
59 pages
DS Assignment - 4
PDF
No ratings yet
DS Assignment - 4
10 pages
C & DS Unit - III
PDF
No ratings yet
C & DS Unit - III
48 pages
Data Structure 2
PDF
No ratings yet
Data Structure 2
50 pages
Ds-Linked Lis
PDF
No ratings yet
Ds-Linked Lis
50 pages
DSOR
PDF
No ratings yet
DSOR
50 pages
Recording
PDF
No ratings yet
Recording
48 pages
Dsa Unit 2 Notes
PDF
No ratings yet
Dsa Unit 2 Notes
35 pages
Unit1 Notes
PDF
No ratings yet
Unit1 Notes
36 pages
DSA
PDF
No ratings yet
DSA
28 pages
DSA Lab Sheet
PDF
No ratings yet
DSA Lab Sheet
33 pages
DSA Notes
PDF
No ratings yet
DSA Notes
31 pages
DSA Solved Paper (May - June 2023) PDF
PDF
No ratings yet
DSA Solved Paper (May - June 2023) PDF
27 pages
Dat Astruc T 08976
PDF
No ratings yet
Dat Astruc T 08976
26 pages
Fds Assignment 3 4 5
PDF
No ratings yet
Fds Assignment 3 4 5
23 pages
LinkedList
PDF
No ratings yet
LinkedList
24 pages
Data Structure Linked List Short Note
PDF
No ratings yet
Data Structure Linked List Short Note
22 pages
2nd Unit Ds 1st Yr
PDF
No ratings yet
2nd Unit Ds 1st Yr
23 pages
DSL 3 Unit Full
PDF
No ratings yet
DSL 3 Unit Full
25 pages
Govt Based
PDF
No ratings yet
Govt Based
19 pages
DS Unit 1
PDF
No ratings yet
DS Unit 1
25 pages
DSA chp-4 - English
PDF
No ratings yet
DSA chp-4 - English
21 pages
Dsa Basic
PDF
No ratings yet
Dsa Basic
23 pages
Linked List
PDF
No ratings yet
Linked List
20 pages
"Data Notes": Structure
PDF
No ratings yet
"Data Notes": Structure
21 pages
Unit IV Linkedlist - Watermark
PDF
No ratings yet
Unit IV Linkedlist - Watermark
19 pages
DSA Assignment
PDF
No ratings yet
DSA Assignment
18 pages
Adsa Assignment3
PDF
No ratings yet
Adsa Assignment3
14 pages
Programs For Dsu Manual
PDF
No ratings yet
Programs For Dsu Manual
15 pages
Kajal Soni IPE Data Structure
PDF
No ratings yet
Kajal Soni IPE Data Structure
17 pages
LL 04
PDF
No ratings yet
LL 04
16 pages
Big O and DSA Sketch Notes
PDF
No ratings yet
Big O and DSA Sketch Notes
12 pages
Screenshot 2023-12-05 at 12.59.14 PM
PDF
No ratings yet
Screenshot 2023-12-05 at 12.59.14 PM
12 pages
Important Topics
PDF
No ratings yet
Important Topics
12 pages
Linked List Jenny
PDF
No ratings yet
Linked List Jenny
10 pages
Link List - Data Structure
PDF
No ratings yet
Link List - Data Structure
9 pages
Supermind 4 Unit 9 Exercise
PDF
No ratings yet
Supermind 4 Unit 9 Exercise
8 pages
Singly Linked List
PDF
No ratings yet
Singly Linked List
9 pages
Singly Linked List
PDF
No ratings yet
Singly Linked List
9 pages