SlideShare a Scribd company logo
1 of 1
Download to read offline
What is a linked list?
What is a linked lists general syntax?
Can you give me any tips on using linked lists or any extra general info I may need to know?
Solution
Linked Lists: It is a collection of data elements. A single linked list points to the next element of
the linked list. A double linked list points to both the previous and next elements.
For every node in the linked list, it has 2 parts - data and pointer
Unlike arrays, linked lists are not stored at continguous location. As compared to arrays, linked
lists offer dynamic size (we can add or delete elements from the linked list easily). A
disadvantage as compared to arrays being, random access of the element is not possible in a
linked list.
General Syntax in C:
//node
struct node
{
int data; // data element
struct node *next; // pointer to next element
}
Best way to learn linked lists is to implement the data structure along with some basic operations
on it: Inserting an element (at the start, at the end, at the middle), Deleting an element (from the
start, from the end, from the middle), Counting the number of elements etc.

More Related Content

Similar to What is a linked listWhat is a linked lists general syntaxCan .pdf

linked list.pptx
linked list.pptxlinked list.pptx
linked list.pptxpijuschal1
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxsarala9
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEVenugopalavarma Raja
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm KristinaBorooah
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptxssuserd2f031
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptxSaralaT3
 
For each of the abstract data types (ADTs) that we have analyzed in th.docx
For each of the abstract data types (ADTs) that we have analyzed in th.docxFor each of the abstract data types (ADTs) that we have analyzed in th.docx
For each of the abstract data types (ADTs) that we have analyzed in th.docxmichael1810
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introductionSugandh Wafai
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESsuthi
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure shameen khan
 

Similar to What is a linked listWhat is a linked lists general syntaxCan .pdf (20)

Linked list
Linked listLinked list
Linked list
 
linked list.pptx
linked list.pptxlinked list.pptx
linked list.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCEARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
ARRAYS IN C++ CBSE AND STATE +2 COMPUTER SCIENCE
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptx
 
DS Module 1.pptx
DS Module 1.pptxDS Module 1.pptx
DS Module 1.pptx
 
.DATA STRUCTURES
.DATA STRUCTURES  .DATA STRUCTURES
.DATA STRUCTURES
 
For each of the abstract data types (ADTs) that we have analyzed in th.docx
For each of the abstract data types (ADTs) that we have analyzed in th.docxFor each of the abstract data types (ADTs) that we have analyzed in th.docx
For each of the abstract data types (ADTs) that we have analyzed in th.docx
 
Data structure & algorithms introduction
Data structure & algorithms introductionData structure & algorithms introduction
Data structure & algorithms introduction
 
linked_lists
linked_listslinked_lists
linked_lists
 
Unit 3 dsa LINKED LIST
Unit 3 dsa LINKED LISTUnit 3 dsa LINKED LIST
Unit 3 dsa LINKED LIST
 
Data structures
Data structuresData structures
Data structures
 
DSA - Copy.pptx
DSA - Copy.pptxDSA - Copy.pptx
DSA - Copy.pptx
 
csc211_lecture_21.pptx
csc211_lecture_21.pptxcsc211_lecture_21.pptx
csc211_lecture_21.pptx
 
DATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTESDATA STRUCTURES - SHORT NOTES
DATA STRUCTURES - SHORT NOTES
 
Data structure
 Data structure Data structure
Data structure
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
 
Linked list in DS
Linked list in DSLinked list in DS
Linked list in DS
 

More from bhim1213

In 1998, Congress passed legislation concerning shifting the burden .pdf
In 1998, Congress passed legislation concerning shifting the burden .pdfIn 1998, Congress passed legislation concerning shifting the burden .pdf
In 1998, Congress passed legislation concerning shifting the burden .pdfbhim1213
 
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdf
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdfIf A denotes some event, what does A denote If P(A)equals=0.997, wh.pdf
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdfbhim1213
 
How do neutrophils find and get to an infectionSolutionNeutro.pdf
How do neutrophils find and get to an infectionSolutionNeutro.pdfHow do neutrophils find and get to an infectionSolutionNeutro.pdf
How do neutrophils find and get to an infectionSolutionNeutro.pdfbhim1213
 
How many times will the following code print Welcome to Java in.pdf
How many times will the following code print Welcome to Java  in.pdfHow many times will the following code print Welcome to Java  in.pdf
How many times will the following code print Welcome to Java in.pdfbhim1213
 
From your own words not copy past from internet please Talked about.pdf
From your own words not copy past from internet please Talked about.pdfFrom your own words not copy past from internet please Talked about.pdf
From your own words not copy past from internet please Talked about.pdfbhim1213
 
Forms an important part of the subunits of the ribosome. The _ are sp.pdf
Forms an important part of the subunits of the ribosome. The _ are sp.pdfForms an important part of the subunits of the ribosome. The _ are sp.pdf
Forms an important part of the subunits of the ribosome. The _ are sp.pdfbhim1213
 
During DNA replication, a series of steps are required to ensure tha.pdf
During DNA replication, a series of steps are required to ensure tha.pdfDuring DNA replication, a series of steps are required to ensure tha.pdf
During DNA replication, a series of steps are required to ensure tha.pdfbhim1213
 
Disease X occurs when someone has the xx genotype. However, only 20 .pdf
Disease X occurs when someone has the xx genotype. However, only 20 .pdfDisease X occurs when someone has the xx genotype. However, only 20 .pdf
Disease X occurs when someone has the xx genotype. However, only 20 .pdfbhim1213
 
Darwins Theory had five main tenets (or components), what are they.pdf
Darwins Theory had five main tenets (or components), what are they.pdfDarwins Theory had five main tenets (or components), what are they.pdf
Darwins Theory had five main tenets (or components), what are they.pdfbhim1213
 
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdf
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdfDefine toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdf
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdfbhim1213
 
A system was set up in parallel with two components, A and B. The pr.pdf
A system was set up in parallel with two components, A and B. The pr.pdfA system was set up in parallel with two components, A and B. The pr.pdf
A system was set up in parallel with two components, A and B. The pr.pdfbhim1213
 
All content is made permanent for future use. All content will be lo.pdf
All content is made permanent for future use.  All content will be lo.pdfAll content is made permanent for future use.  All content will be lo.pdf
All content is made permanent for future use. All content will be lo.pdfbhim1213
 
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdf
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdfa. A waitress is serving 5 people at a table. She has the 5 dishes t.pdf
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdfbhim1213
 
Biochemistry homework Focus concept ripening fruit and the activity.pdf
Biochemistry homework Focus concept ripening fruit and the activity.pdfBiochemistry homework Focus concept ripening fruit and the activity.pdf
Biochemistry homework Focus concept ripening fruit and the activity.pdfbhim1213
 
A process that has its representative PCB in a device queue is in th.pdf
A process that has its representative PCB in a device queue is in th.pdfA process that has its representative PCB in a device queue is in th.pdf
A process that has its representative PCB in a device queue is in th.pdfbhim1213
 
Which of the following statements is (are) trueI Cash flow is a.pdf
Which of the following statements is (are) trueI  Cash flow is a.pdfWhich of the following statements is (are) trueI  Cash flow is a.pdf
Which of the following statements is (are) trueI Cash flow is a.pdfbhim1213
 
What is the relationship of the epithelium of the epidermis to the co.pdf
What is the relationship of the epithelium of the epidermis to the co.pdfWhat is the relationship of the epithelium of the epidermis to the co.pdf
What is the relationship of the epithelium of the epidermis to the co.pdfbhim1213
 
What is the output of running class GenericMethodDemo of the followi.pdf
What is the output of running class GenericMethodDemo of the followi.pdfWhat is the output of running class GenericMethodDemo of the followi.pdf
What is the output of running class GenericMethodDemo of the followi.pdfbhim1213
 
What do you think are the roles of professional societies in contemp.pdf
What do you think are the roles of professional societies in contemp.pdfWhat do you think are the roles of professional societies in contemp.pdf
What do you think are the roles of professional societies in contemp.pdfbhim1213
 
What is the compensation depth for phytoplankton How does it differ .pdf
What is the compensation depth for phytoplankton How does it differ .pdfWhat is the compensation depth for phytoplankton How does it differ .pdf
What is the compensation depth for phytoplankton How does it differ .pdfbhim1213
 

More from bhim1213 (20)

In 1998, Congress passed legislation concerning shifting the burden .pdf
In 1998, Congress passed legislation concerning shifting the burden .pdfIn 1998, Congress passed legislation concerning shifting the burden .pdf
In 1998, Congress passed legislation concerning shifting the burden .pdf
 
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdf
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdfIf A denotes some event, what does A denote If P(A)equals=0.997, wh.pdf
If A denotes some event, what does A denote If P(A)equals=0.997, wh.pdf
 
How do neutrophils find and get to an infectionSolutionNeutro.pdf
How do neutrophils find and get to an infectionSolutionNeutro.pdfHow do neutrophils find and get to an infectionSolutionNeutro.pdf
How do neutrophils find and get to an infectionSolutionNeutro.pdf
 
How many times will the following code print Welcome to Java in.pdf
How many times will the following code print Welcome to Java  in.pdfHow many times will the following code print Welcome to Java  in.pdf
How many times will the following code print Welcome to Java in.pdf
 
From your own words not copy past from internet please Talked about.pdf
From your own words not copy past from internet please Talked about.pdfFrom your own words not copy past from internet please Talked about.pdf
From your own words not copy past from internet please Talked about.pdf
 
Forms an important part of the subunits of the ribosome. The _ are sp.pdf
Forms an important part of the subunits of the ribosome. The _ are sp.pdfForms an important part of the subunits of the ribosome. The _ are sp.pdf
Forms an important part of the subunits of the ribosome. The _ are sp.pdf
 
During DNA replication, a series of steps are required to ensure tha.pdf
During DNA replication, a series of steps are required to ensure tha.pdfDuring DNA replication, a series of steps are required to ensure tha.pdf
During DNA replication, a series of steps are required to ensure tha.pdf
 
Disease X occurs when someone has the xx genotype. However, only 20 .pdf
Disease X occurs when someone has the xx genotype. However, only 20 .pdfDisease X occurs when someone has the xx genotype. However, only 20 .pdf
Disease X occurs when someone has the xx genotype. However, only 20 .pdf
 
Darwins Theory had five main tenets (or components), what are they.pdf
Darwins Theory had five main tenets (or components), what are they.pdfDarwins Theory had five main tenets (or components), what are they.pdf
Darwins Theory had five main tenets (or components), what are they.pdf
 
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdf
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdfDefine toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdf
Define toxic shock syndrome (TSS) impetigo MRSASolutionAnswer.pdf
 
A system was set up in parallel with two components, A and B. The pr.pdf
A system was set up in parallel with two components, A and B. The pr.pdfA system was set up in parallel with two components, A and B. The pr.pdf
A system was set up in parallel with two components, A and B. The pr.pdf
 
All content is made permanent for future use. All content will be lo.pdf
All content is made permanent for future use.  All content will be lo.pdfAll content is made permanent for future use.  All content will be lo.pdf
All content is made permanent for future use. All content will be lo.pdf
 
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdf
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdfa. A waitress is serving 5 people at a table. She has the 5 dishes t.pdf
a. A waitress is serving 5 people at a table. She has the 5 dishes t.pdf
 
Biochemistry homework Focus concept ripening fruit and the activity.pdf
Biochemistry homework Focus concept ripening fruit and the activity.pdfBiochemistry homework Focus concept ripening fruit and the activity.pdf
Biochemistry homework Focus concept ripening fruit and the activity.pdf
 
A process that has its representative PCB in a device queue is in th.pdf
A process that has its representative PCB in a device queue is in th.pdfA process that has its representative PCB in a device queue is in th.pdf
A process that has its representative PCB in a device queue is in th.pdf
 
Which of the following statements is (are) trueI Cash flow is a.pdf
Which of the following statements is (are) trueI  Cash flow is a.pdfWhich of the following statements is (are) trueI  Cash flow is a.pdf
Which of the following statements is (are) trueI Cash flow is a.pdf
 
What is the relationship of the epithelium of the epidermis to the co.pdf
What is the relationship of the epithelium of the epidermis to the co.pdfWhat is the relationship of the epithelium of the epidermis to the co.pdf
What is the relationship of the epithelium of the epidermis to the co.pdf
 
What is the output of running class GenericMethodDemo of the followi.pdf
What is the output of running class GenericMethodDemo of the followi.pdfWhat is the output of running class GenericMethodDemo of the followi.pdf
What is the output of running class GenericMethodDemo of the followi.pdf
 
What do you think are the roles of professional societies in contemp.pdf
What do you think are the roles of professional societies in contemp.pdfWhat do you think are the roles of professional societies in contemp.pdf
What do you think are the roles of professional societies in contemp.pdf
 
What is the compensation depth for phytoplankton How does it differ .pdf
What is the compensation depth for phytoplankton How does it differ .pdfWhat is the compensation depth for phytoplankton How does it differ .pdf
What is the compensation depth for phytoplankton How does it differ .pdf
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 

What is a linked listWhat is a linked lists general syntaxCan .pdf

  • 1. What is a linked list? What is a linked lists general syntax? Can you give me any tips on using linked lists or any extra general info I may need to know? Solution Linked Lists: It is a collection of data elements. A single linked list points to the next element of the linked list. A double linked list points to both the previous and next elements. For every node in the linked list, it has 2 parts - data and pointer Unlike arrays, linked lists are not stored at continguous location. As compared to arrays, linked lists offer dynamic size (we can add or delete elements from the linked list easily). A disadvantage as compared to arrays being, random access of the element is not possible in a linked list. General Syntax in C: //node struct node { int data; // data element struct node *next; // pointer to next element } Best way to learn linked lists is to implement the data structure along with some basic operations on it: Inserting an element (at the start, at the end, at the middle), Deleting an element (from the start, from the end, from the middle), Counting the number of elements etc.