39 views

Uploaded by Sachin Varghese

c

- Program List
- c Interview Que
- 8. Measurement Of
- Quiz Bank-1
- Linked List
- C Program to Implement a Stack and Queue Using a Linked List
- Chapter 04
- qb_ds
- polynomial
- 11Polynomial Equation
- C Program to Insert a Node at Front, At End, And at Any Position in a Single Linked List. _ KNOWLEDGE
- MCS (S) Dec 2005
- Practical List XII C
- class_10_test_2
- data str
- Quadratic Equations
- Curriculum Audit q1 g 10 Bugetted Lesson
- Algebra 1 (Solutions)
- unit plan
- revamped lesson plan

You are on page 1of 4

Linked Lists:

A series of structures connected with pointers can be used to implement the data structures. Each structure contains data with one or more pointers to neighboring structures.

There are several variants of the linked list structure: Endogenous / Exogenous lists:

- endogenous lists have the data stored in the structure's KEY. The KEY is data stored within the structure. - e ogenous lists have the data stored outside the structure. !nstead of a KEY" the structure has a pointer to the data in memor#. E ogenous lists do not re$uire data to be moved when individual cells are moved in a list% onl# the pointers to data must be changed. This can save considerable cost when dealing with large data in each cell. Another benefit of e ogenous lists is man# cells can point to the same data. Again" this ma# be useful depending on the application.

struct endogenous ' data(t#pe ke#" struct endogenous ) ne t *% struct e ogenous ' data(t#pe ) data" struct e ogenous ) ne t *%

- a circular list has the last cell in the arra# pointing to the first cell in the arra#. +pecificall#" the last cell's 'ne t' pointer references the first cell. ,epresentation in - : last(cell.ne t . /first(cell - the last cell in a non-circular list points to nothing. ,epresentation in - : last(cell.ne t . 0122 -ircular lists are useful for representing pol#gons 3for e ample4 because one can trace a path continousl# back to where one started. This is useful for representing a pol#gon because there is essentiall# no starting or ending point. Thus" we would like an implementation to illustrate this.

- a header node is a dumm# first node in the list. !t is not part of the data" but rather contains some information about the list 3eg. si6e4. - a trailer node is at the end of a list 3its contents marks the end4.

-each node in a doubl# linked list is a structure with two pointers to link with neighboring nodes. 7ne pointer points to the ne t node in the list" and the other pointer points to the previous node in the arra#. This implementation is useful for deleting nodes. The algorithm can be performed in 7354 time. 8eleting nodes in a singl# linked list can be done in 79E:A3n4 time. Therefore" doubl# linked lists can be ver# useful in applications re$uiring a lot of deletions. The pseudocode for the delete algorithm is as follows:

A pol#nomial can be represented with primitive data structures. <or e ample" a pol#nomial represented as ak k ak-5 k-5 = ... = a> can be represented as a linked list. Each node is a structure with two values: ai and i. Thus" the length of the list will be k. The first node will have 3a k" k4" the second node will have 3ak-5" k-54 etc. The last node will be 3a>" >4. The pol#nomial ? @ = A ? = B can be represented in a list as follows: 3?"@4 --; 3A"?4 --; 3B">4 where each pair of integers represent a node" and the arrow represents a link to its neighbouring node. 8erivatives of pol#nomials can be easil# computed b# proceeding node b# node. !n our previous e ample the list after computing the derivative would represented as follows: 3CA"D4 --; 3C5"C4. The specific pol#nomial A8T will define various operations" such as multiplication" addition" subtraction" derivative" integration etc. A pol#nomial A8T can be useful for s#mbolic computation as well. C

2arge integers can also be implemented with primitive data structures. To conform to our previous e ample" consider a large integer represented as a linked list. !f we represent the integer as successive powers of 5>" where the power of 5> increments b# ? and the coefficient is a three digit number" we can make computations on such numbers easier. <or e ample" we can represent a ver# large number as follows: B5?35>E4 = D@@35>?4 = ACC35>>4. 1sing this notation" the number can be represented as follows: 3B5?4 --; 3D@@4 --; 3ACC4. The first number represents the coefficient of the 5>E term" the ne t number represents the coefficient of the 5>? term and so on. The arrows represent links to adFacent nodes. The specific A8T will define operations on this representation" such as addition" subtraction" multiplication" division" comparison" cop# etc.

).

A window interface can be represented b# lists. -onsider an environment with man# windows. The fist node in the list could represent the current active window. +ubse$uent windows are further along the list. !n other words" the n th window corresponds to the nth node in the list. The A8T can define several functions" such as <ind(first(window which would bring a window clicked upon to the front of the list 3make it active4. 7ther functions could perform window deletion or creation.

Ghen memor# is re$uested" a list of available blocks of memor# might be useful. Again" a list could represent blocks in memor# available to the user" with nodes containing pointers to these available blocks. The list can be used like a stack 32!<74. The last freed memor# becomes the ne t available to the user. +uch lists are called 'free space lists' or 'available space lists'. +ince addition and deletion of nodes is at one end" these lists behave like stacks. All operations on free space lists can be done in 7354 time.

A linked list in which each node is linked to both its successor and its predecessor. templateHclass !temT#pe; struct 0odeT#pe ' !temT#pe info% 0odeT#peHitemT#pe;) ne t% 0odeT#peHitemT#pe;) previous% *% A linear doubl# linked list is defined in the following picture.0ote that previous member of the node and ne t member of last node" contains a 0122. The following definition might be used to declare the nodes in such a list: templateHclass !temT#pe; struct 0odeT#pe ' !temT#pe info% 0odeT#peHitemT#pe;) ne t% 0odeT#peHitemT#pe;) previous% *%

listdata 8avid Jud# 9aria ,obert

listdata

8avid

Jud#

9aria

,obert

new0ode

2eah

listdata

8avid

Jud#

9aria

,obert

location

- Program ListUploaded bygomathisankar.v1978
- c Interview QueUploaded byManu Cool
- 8. Measurement OfUploaded byiaset123
- Quiz Bank-1Uploaded byRajvardhan Jain
- Linked ListUploaded bydarshancool25
- C Program to Implement a Stack and Queue Using a Linked ListUploaded byAnonymous QbchUByq2
- Chapter 04Uploaded byPoorna Buddhika Rajakaruna
- qb_dsUploaded bySuman Rao
- polynomialUploaded byRohan
- 11Polynomial EquationUploaded byKiarrha Carmella Carino
- C Program to Insert a Node at Front, At End, And at Any Position in a Single Linked List. _ KNOWLEDGEUploaded bySachin Puri
- MCS (S) Dec 2005Uploaded byamritanshuu
- Practical List XII CUploaded byharry potter
- class_10_test_2Uploaded byPraveen Kumar
- data strUploaded bySupreeth Mohan
- Quadratic EquationsUploaded byAnkit Rastogi
- Curriculum Audit q1 g 10 Bugetted LessonUploaded byJoel Huelgas Villegas
- Algebra 1 (Solutions)Uploaded byShashank Bhardwaj
- unit planUploaded byapi-249701677
- revamped lesson planUploaded byapi-280793165
- 50788596 Data Structure in C Book ProgramsUploaded bynaznin18
- Mth202 Collection of Old PapersUploaded bycs619finalproject.com
- OptimUploaded byadams1234
- New- Update- Shivaji University 1 .Doc 10 Feb 2014 SE SyllabusUploaded byVinod Kumbhar
- maths unit plan 2016 numberUploaded byapi-262717088
- Homework 4Uploaded byAvadhoot_Joshi
- Data Structure 1Uploaded byapi-3843022
- شيت البرمجة النسخة النهائية بعد التعديلUploaded bygk_gohary
- 03-CCFP4.0_OOP Using JavaUploaded byVishal Iyer
- MRSPTU B.tech. CSE (Sem 3-8) Syllabus 2016 Batch Onwards Updated on 29.7.2017Uploaded byVishal Sharma

- gUploaded bySachin Varghese
- Parallel Virtual MachineUploaded bySachin Varghese
- CS Syllabus 2012 Admissions OnwardsUploaded byAnurag Determined
- FINANCIAL-AWARENESS-CAPSULE-2015.pdfUploaded byPrabha Karuppuchamy
- Omnipage User's Guide (French)Uploaded bySetang Besar
- Notification New India Assurance Company Ltd 1536 Assistant PostsUploaded byNilesh Gupta
- 63156(a) - 25 May 15 (1)Uploaded bySachin Varghese
- Computer Network Lab Viva QuestionsUploaded byVivek Chand
- Reasoning Test With SolutionsUploaded byLakshmynair
- Oliveboard SBIPO 2013 SolvedPaperUploaded bySachin Varghese
- TricksUploaded bySachin Varghese
- 1406545215452 de Reservation of CoachesUploaded bySachin Varghese
- Season Ticket Affidavit NvewUploaded bySachin Varghese
- Advanced Architecture & Parallel Processing 2012 Nov (2006 Ad)Uploaded bySachin Varghese
- Doc1Uploaded bySachin Varghese
- Computer Networks April 2010 (2006 Ad) - [ Www.cusatxpress.comm kj jl ]Uploaded bySachin Varghese
- Untitled Document.pdfUploaded bySachin Varghese
- 06_C54xDSPUploaded bySachin Varghese
- Software Design IssueUploaded bysonal
- 04-StructuredP1Uploaded byFlow Manikandan
- Lecture 8Uploaded byvijaygenius123
- L02-8086RegistersAndMemorySegmentationUploaded bySachin Varghese
- 16.PageReplacementAlgosUploaded bysaichandrasekhar_d
- 9 Add Two 8 Bit NumbersUploaded bySachin Varghese
- 19c Single and Doubly Linked ListsUploaded bySachin Varghese
- 07, Legal Thought, BBA LLB, LLB & LLM - Notification 2013Uploaded bySachin Varghese
- Software EngineeringUploaded byAjinkya
- Mod-2 , Bresenhams Line Drawing AlgorithmUploaded bySachin Varghese
- Digital Signal Processing Sept 2010 (2006 Amjd) - [ Www.cusatxpress.com ]Uploaded bySachin Varghese

- GetTRDoc_2Uploaded bymoein_joon27
- Building Envelope AuditUploaded bymalikakbaar
- BLAUPUNKT DX R 70Uploaded byHotzuletz Zmekerash
- US BenchmarkUploaded byingbarragan87
- Team6 Button BounceUploaded byjose moreno
- Sustainable MaterialsUploaded byEnshaS
- type of gas carriersUploaded byArun Iyer
- Impact of a Water JetUploaded byKhamees Marwan Muhiesen
- monitorUploaded byIndira Devi Pedaprolu
- محاضرات هندسة الاساسات د. طارق نجيب P3Uploaded byHasan
- jebUploaded byAr Melissa Burgos Orlanes
- G080048-00Uploaded byBeverly Paman
- A Corpus of Images and Text in Online NewsUploaded byIvan
- Liquefaction Analysis ReportUploaded byDaljeet Sidhu
- ISecMg T1 to T8 Answers.pdfUploaded byGordon
- 006 Id 101Uploaded bylavate amol bhimrao
- Packaging ReportUploaded byPuspita Sari
- Fire Test Cert API 607 6th Ed 8in 900cls Ball ValveUploaded bystrahor7492
- ARTIGO 12B_A Review of Buildability Performancein Hong KongUploaded bydelciogarcia
- Cabin System Presentation Day 12 and 13Uploaded bysebastien
- craneUploaded byranjit688
- Computer Shopper - July 2016 UKUploaded bycarlossp22
- 130nm-techbrief01Uploaded byGilang Mardian K
- Metal RollingUploaded byNishith
- AC FLIR E Series Infrared Camera ManualUploaded byaracelimccarthybod
- RM1xE1Uploaded bycirbo
- Global Smart Meter Market- Insights, Market Size, Share, Growth, Trends Analysis and Forecast to 2021Uploaded bytufail attar
- Companion Document to en 1992-1-1 Eurocode 2Uploaded byAndrew Kreimer
- ANSYS Tutorial Seismic AnalysisUploaded byArut MV
- Floor Hardening ConcreteUploaded byNo Green Blue