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)
10 views
Data Structure Linked List Short Note
Exam oriented notes on linked list
Uploaded by
Nilesh Koli
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save data structure linked list short note For Later
Download
Save
Save data structure linked list short note For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
10 views
Data Structure Linked List Short Note
Exam oriented notes on linked list
Uploaded by
Nilesh Koli
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save data structure linked list short note For Later
Carousel Previous
Carousel Next
Save
Save data structure linked list short note For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 22
Search
Fullscreen
°, Vigt — C_doubly linked list 3s ackype ofinked — Mist there enth node contains —c—datte—_ a 0. Ye 7 Ané_poinHng te _+me_next node qnd_—the [the ey operation tm pu Aven Trsertion = na At the beginning - J ~— : 3 Tnsert a nein hode hePore +ne head - {4 ; ‘S) next pointer the n VEouS 2 S$ tn the New node: n * \e cuxxent +i) next pointer +p +he mew node. Gnd the new pg cle! [previous pi inter e + teil — = enDate . Page No. tn _the middle - 5 rade het Lane mext cand prey point =ring nodes +o accommodate the net nod. e. fey OF the neig hbo 9. DeleHan from the beginning - JT J remove the head node by updating tne head. pointer td the next node and setting tne Men) head pre to_null- “from the end‘ remove the tail Node by_updating she tai) Pointer to tne pervious node Seling | tne new toils —nexb To nuit. From the middle - Lremoie a- Specific node by updahing tes Lethe nexk i OF + & 5 poindey OF tne — ore VIOUS “ned Lendl fhe prev Pointer Of _the next nace +o slei9 +h cusrent nade 8 | Tpaversal = -| Forusord traversal = Stark Fram, the _heacl_& move pepe) | the tri{ by Pollo wine paintsDato | Page No. Bacleward _-praversal - Ee 3 Stork Cran: tne toil cid moses noord ee 3 the head by FoMouwiing tne prev pointe - i ~~ Y Searching - = Search ~ for ca SpeciPic node by troversicy [either fotword From the heaol “77 Oe back Word prom tne! teri) Cormparing data in each node. Reversing - =e reverse a Di by Swapping tne tnext porch prey pointe’ (Oe colt iceaee Tia Pana 3 tine 4 up clating Astin ec fais oleh a: and teil ss E these operaton make DU mere Flexible iy y +han singly linked isk Since they —cliow_bidivechianal traversal.a) Ahal owe the dif Date Page No. _inleeds tis. 9 Give —O +he_—_}inkeg —— disadvanta nge each OF _ | jist ONer —ano+her+ ~ | Advantage E each +0 implement pes dees -|_ Simple Structure ~-| eFFicjent Cor sequential head +0 +he Seeds access Pram Hee athey“tinleed 11st ty pe-.— + 44only require one pointer _pex node. -| feicient memory \Sage 7 J Fast ingerahion / deletion at bead Simple implementa Han + ip ygadstantbeg ee =| Only allows —trawer-sal__in Gne_divectien 4 ine FRicienk Por “operahion thot nequire -access to presiious node: ~—| No mace —aNclom access.eS - ; se hap Ss insertion ‘ond deletion ok. the rif wat ce trePeicienk 410s thé! _wequive traversing thes @htive Lis ke Bee 1. Kequired: Por poihtey Slow. Search und —insercition fdelition at specific position ——2 1 Doibly tented trgh a! e = erst ip polotey te the pext nod€ cand co Pointey +n tne perwiOus nacl@ Fak Ad antag e< van eFFicient Por | Operatan Needing “cuccess TO_both -periviouS' 9) next node, - = fasty inseraHon & deletion at oth ends ‘ sAeusy Implementution iOF stacle & e \ Di aclvantage = = mor toothy oi FJ i po move _Compiex +o Tenplemen} y pnanage Comple tenple mentation -5 i eireuler inland: Ieee ft aanie ae the last node potoke_| Sea Advantage te allows cixculay timyersal + looping bate ty the Stert = = USePul for civuulay queue 4 ound Cabin, Scheduling + Can Stat +raversal From any ede “| eFEicient use Of memory. * Fost pnsertion. /delehon at canyy positho N Fi ieceloy huFFers + Disddantage La. it _enltr iad tig Ne vel Comiple xt olemienbetine = Leet in eS C+ -| picle of -InFinite loops te Mot maneged_| care Fully ste lo explicit end. Comp peating travers Logic st more Complex im.| [Date] | Page No. | Wa : na ot 4 Coultiply linked lisp st eo at ee. > each fede ha roultiple Pointer. a | to onbthey mades i rd lantbag € SEetcienk search gnd traversal 3h E Multiple direcHan é uOSerul « for teaple menting Complex Ee date Structuve Diseact lon tage = High enembry Fequtvement : ———Gamplex —teplens mentation _¢ ‘mainbenane< | Insertion ope “Ensertian + at create Jttiuxe. the_desived positin adjust Actordingly[oa] Page No. ae Deletion = f ye eee eee nning ae cnet ine he lick js pb, «Noting to delete 1 cn has One node 1 Set jt. ro * nui g — iF more than one node» Find the lust node, ciclfugtt. iby nexbh polotty ro dhe Setond node? & Ser the head tn +he Second nore. i 2. Prom “end = traverse” “tp Find the Second= te-lask node” & Set i+5 Next! poinde) to fhe hedd. ' : FF oO SpeciFic position traverse | Fe_the nocle pberove the ctkarget hode a Beyust pointer fo Skip the dénget — Node4. Tustiey ow e EAE based OP dynamic a sts a\locaion and ligt tne APP os aoe of linked list pypannic Mem 2 inked yish_1S:0 duke SrruchrKe —— atiocation- Tusieicatian = us i gen dalnseheen he “(nodes contaiA poelement 4 namically AS— a linked |ish— where each elernent— a_eFerante —+n-the EX memory —1g_atlocated- oy) needed: during buntime= ins tig oncdlee inked lists ermmoxy — allocation -____— On dy pari mM. o Knked 25h %6ia dota _etruchure Huaves is based on “dynamic memory allocation hecause = ood = memory 16 allocated dynamically pee each phde inode are ot created! &. deletedi? needed —_ Wolte Memory allocation $s not Fixed & i+ change _duyviag —atinoie.— i eri HE Dy namic eiemhosyo: boca iow: - i E Vince dh” Mighe beend |p 499 i TAL‘ linked yigh'’ Maeroomy its. “CLO Cated dymamicaiig using teplotabeye il i: ib ao i each node 35 allocated Mmémory + ¢ P “Acl_the memory is released “iohen rhe ode is delet dest 4 E aS sopra provide Sevaral bent : EPFictent . Memory ag.e: ~ CULO cated pean For she needed - ‘ “Memary i nade axe Plexi bite 7 = linked lists, Car G9 Fou poe Shrink dgnanat deainyattel edaw es + dyna oar @) memory -cilaca ti : graphic = “[bnieecl lish Cans nn anage gr ently 7 1 _ mam ory CFE iC TB reunser_htsimy—Linked ls browser history dynamically : inked lists implement undo/redo Functiona _ebriciently vit + Undo lredo-Function-= | File Guster mnanagement = linked | e File ‘Systern metadata Can mm : dynamical ] | plekworl |_WotS~ Can manage net dy namicaly 1 { a Le + compilex_design — \enleed 14516 can i | Symbol *able and parse etree dd(Sea ea a Sh __s. | What js the Singly nk. Hohe [ees 1 eens ane EY tree j_ltnect! Mish: 45-aL “dais riche _ | uae ie ee oe element _ riaer Sarr aioe caro Fsitontoined a node. a chararkertstics = ea {1 $9 Mneay ordey Dynamic size - the ‘Size Can gro or i Shrink as Needed ALourin g Fok CEFicfen} memory eae Unidireotts nal ~ tiaWer they is_only Ssible Ar: One
Page No. == Si talhat ts Singly -cireuldy Linked a ote on _algorithra to traverse” ———ope) 3 ol A Singly Circular linked Jisks 46g a 13 list where each node polot Next node in a circular fashion. —|Key Feacture — Cirtuloy Strue tye =the last node‘TF 4+n€ next node (ae | Page No. move to tne _mext node Ig tne head Stmp- ea eT A At +e end - Add la} eration = + the beginning ~ Add anode befor the head. onodées diFtey the last 1 node et 1 7 ‘ 4 ¢ int ‘ e at i * a _given position Deletion = 1 i From the heginning ~ bemove the - “head node Eroci be enel - remove: the -last-node = First node mith Specieic Nalue » By positian — remove a node at given PO ition + | Seatch = - Find a ood boy Jolue raTraversa) NISiE ecich mode: POL aes 2 : ae ee LE Counce UGH) Count he numberof Node Inthe is . : WwW vile_o short note on dy nami.G__skorage_ Management -* PLolin___how i+ 13. donesibie iiss i eee ate Set a Dyna mic_ Storage management refers ‘VO-ne process of etl ocating —decillo Cakingmemory during the I-EXeUIt ons OF a. Program dt eri Key Concept = | Dynamic __me mory cloratan = nemMoxry PS Vallocated a+ runtime Using Function in c4+y 2 the cl located memory can be of ciny Size Y__Can_gvote or ¢h rink OS _needed_ is ly pica ly munged— Ll aire a OF memory know —— heaqp. Bena : ao(cae Page No. Unlike Stack memory +heap memary require manual Maanage ment by the fee epeceaaa How _}p_ Dynamic. Srorage management __ ig déne 1 1. Allocahian 2 | em hegp. eadnage mnt ystem Finds cr Suitaple blo\er O-F ete & feturn o_poip kr: 2» Using Mmecoory ~ * m € bet: Lamesa al memory cl needed. t+ Can Store 3. Reallocatsan ~ TE Oo program need More ‘oy less memon thon iniHally allocated. it can : bse PuncHoh +o resize +he memory blocks « ed ——— : zs —— fantia D Fe a Once the qitecated memory is no longer needed it show. be Yeleased — FI +o prevent Memory} leaks. Fimemory management tzchstqué | Garbage collecHon ~ i fe cyincig + | 4s bundled + Cutamatically through 4 qe ion + l if manual | ma nage ment — Tn tanguage Yijee CY CHE developey_ must manually manage Memory * £hiS provide greatey Control but increse §$\ the -risle oF: Cyyoy Era gwhentaton = S LOS memory “$$ -Atocatd Freed the heap Cun become leasing “tO Pn efFicleat —(ial Pago No. Fell ausiag poly nensinal : | Ialhat _is__heacley_Itnked list 9? use headey_jinked {fst 10 Staxe the pos ox8 - oxTy 3x24 4 Sol = pcx): 998 oxT 074 eae (STs si— ls 7] —> [eT 2} [afe) nat tet t -k headey linked List is a dakar steuctuye that Contain a Special node at the beggin beginning of the List Called _ag__heder hocle: Se LHe header node allows accesS +o cul) node inthe [ist & Store the number OF node which make easy +o obtain the Size OF the list + linked list 3¢ the dala struchre that stare element 3? Sequence: each ©lemenk in isk celled as node: | the Ficst node in linked lish fs | head cmd _tash node Caled tail. rr
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6135)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (628)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (935)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8215)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2923)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4973)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Tóibín
3.5/5 (2061)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1988)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2641)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1994)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2544)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carre
3.5/5 (109)