SlideShare a Scribd company logo
#include "node1.h"
#include "list.h"
#include // Provides assert
#include
using namespace std;
value_type head(list lst)
{
list p;
p=list_locate(lst,1);
return p->data();
}
list tail(list lst)
{
node *head=NULL;
node *tail=NULL;
list_copy(lst, head, tail);
list_head_remove(head);
return head;
}
bool list_is_empty(list lst)
{
size_t n= list_length(lst);
if(n==0)
return true;
else
return false;
}
list cons(value_type val, const list lst)
{
node *head=NULL;
node *tail=NULL;
list_copy(lst, head, tail);
list_head_insert(head, val);
return head;
}
Solution
#include "node1.h"
#include "list.h"
#include // Provides assert
#include
using namespace std;
value_type head(list lst)
{
list p;
p=list_locate(lst,1);
return p->data();
}
list tail(list lst)
{
node *head=NULL;
node *tail=NULL;
list_copy(lst, head, tail);
list_head_remove(head);
return head;
}
bool list_is_empty(list lst)
{
size_t n= list_length(lst);
if(n==0)
return true;
else
return false;
}
list cons(value_type val, const list lst)
{
node *head=NULL;
node *tail=NULL;
list_copy(lst, head, tail);
list_head_insert(head, val);
return head;
}

More Related Content

Similar to #include node1.h #include list.h #include cassert P.pdf

Unit 1-array,lists and hashes
Unit 1-array,lists and hashesUnit 1-array,lists and hashes
Unit 1-array,lists and hashes
sana mateen
 
Draw memory map of this link list code and add insert at last ( java)-.pdf
Draw memory map of this link list code and add insert at last ( java)-.pdfDraw memory map of this link list code and add insert at last ( java)-.pdf
Draw memory map of this link list code and add insert at last ( java)-.pdf
Andrew8IBPatersonk
 
A perfect left-sided binary tree is a binary tree where every intern.pdf
A perfect left-sided binary tree is a binary tree where every intern.pdfA perfect left-sided binary tree is a binary tree where every intern.pdf
A perfect left-sided binary tree is a binary tree where every intern.pdf
michardsonkhaicarr37
 
public class SLLT { protected SLLNodeT head, tail; pub.pdf
public class SLLT {     protected SLLNodeT head, tail;     pub.pdfpublic class SLLT {     protected SLLNodeT head, tail;     pub.pdf
public class SLLT { protected SLLNodeT head, tail; pub.pdf
clarityvision
 
Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
sales87
 
I need help writing test Codepackage org.example;import j.pdf
I need help writing test Codepackage org.example;import j.pdfI need help writing test Codepackage org.example;import j.pdf
I need help writing test Codepackage org.example;import j.pdf
mail931892
 
Data structure
Data  structureData  structure
Data structure
Arvind Kumar
 
Template LinkedList;I am using templates to make some linkedLists.pdf
Template LinkedList;I am using templates to make some linkedLists.pdfTemplate LinkedList;I am using templates to make some linkedLists.pdf
Template LinkedList;I am using templates to make some linkedLists.pdf
fatoryoutlets
 
^^^ Discuss about Header Node And also write a program for unorder.pdf
^^^ Discuss about Header Node  And also write a program for unorder.pdf^^^ Discuss about Header Node  And also write a program for unorder.pdf
^^^ Discuss about Header Node And also write a program for unorder.pdf
arihantmum
 
Create your own Linked list from scratch (singly linked list).So.pdf
Create your own Linked list from scratch (singly linked list).So.pdfCreate your own Linked list from scratch (singly linked list).So.pdf
Create your own Linked list from scratch (singly linked list).So.pdf
arumugambags
 
Discuss about Header Node And also write a program for unordered si.pdf
Discuss about Header Node  And also write a program for unordered si.pdfDiscuss about Header Node  And also write a program for unordered si.pdf
Discuss about Header Node And also write a program for unordered si.pdf
eyevision3
 
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdfInspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
vishalateen
 
Solve using Java programming language- ----------------------------.pdf
Solve using Java programming language-   ----------------------------.pdfSolve using Java programming language-   ----------------------------.pdf
Solve using Java programming language- ----------------------------.pdf
aksahnan
 
Main-cpp #include -iostream- #include -List-h- int main() { retur.pdf
Main-cpp  #include -iostream- #include -List-h- int main() {     retur.pdfMain-cpp  #include -iostream- #include -List-h- int main() {     retur.pdf
Main-cpp #include -iostream- #include -List-h- int main() { retur.pdf
PeterM9sWhitej
 
When we first examined the array based and node based implementations.docx
 When we first examined the array based and node based implementations.docx When we first examined the array based and node based implementations.docx
When we first examined the array based and node based implementations.docx
ajoy21
 
Array,lists and hashes in perl
Array,lists and hashes in perlArray,lists and hashes in perl
Array,lists and hashes in perl
sana mateen
 
^^^Q2. Discuss about Header Node    And also write a program fo.pdf
^^^Q2. Discuss about Header Node    And also write a program fo.pdf^^^Q2. Discuss about Header Node    And also write a program fo.pdf
^^^Q2. Discuss about Header Node    And also write a program fo.pdf
arjunhassan8
 
#include iostream using namespace std; const int nil = 0; cl.docx
#include iostream using namespace std; const int nil = 0; cl.docx#include iostream using namespace std; const int nil = 0; cl.docx
#include iostream using namespace std; const int nil = 0; cl.docx
ajoy21
 

Similar to #include node1.h #include list.h #include cassert P.pdf (20)

Unit 1-array,lists and hashes
Unit 1-array,lists and hashesUnit 1-array,lists and hashes
Unit 1-array,lists and hashes
 
Draw memory map of this link list code and add insert at last ( java)-.pdf
Draw memory map of this link list code and add insert at last ( java)-.pdfDraw memory map of this link list code and add insert at last ( java)-.pdf
Draw memory map of this link list code and add insert at last ( java)-.pdf
 
week-13x
week-13xweek-13x
week-13x
 
A perfect left-sided binary tree is a binary tree where every intern.pdf
A perfect left-sided binary tree is a binary tree where every intern.pdfA perfect left-sided binary tree is a binary tree where every intern.pdf
A perfect left-sided binary tree is a binary tree where every intern.pdf
 
public class SLLT { protected SLLNodeT head, tail; pub.pdf
public class SLLT {     protected SLLNodeT head, tail;     pub.pdfpublic class SLLT {     protected SLLNodeT head, tail;     pub.pdf
public class SLLT { protected SLLNodeT head, tail; pub.pdf
 
Use the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdfUse the singly linked list class introduced in the lab to implement .pdf
Use the singly linked list class introduced in the lab to implement .pdf
 
I need help writing test Codepackage org.example;import j.pdf
I need help writing test Codepackage org.example;import j.pdfI need help writing test Codepackage org.example;import j.pdf
I need help writing test Codepackage org.example;import j.pdf
 
CSE240 Doubly Linked Lists
CSE240 Doubly Linked ListsCSE240 Doubly Linked Lists
CSE240 Doubly Linked Lists
 
Data structure
Data  structureData  structure
Data structure
 
Template LinkedList;I am using templates to make some linkedLists.pdf
Template LinkedList;I am using templates to make some linkedLists.pdfTemplate LinkedList;I am using templates to make some linkedLists.pdf
Template LinkedList;I am using templates to make some linkedLists.pdf
 
^^^ Discuss about Header Node And also write a program for unorder.pdf
^^^ Discuss about Header Node  And also write a program for unorder.pdf^^^ Discuss about Header Node  And also write a program for unorder.pdf
^^^ Discuss about Header Node And also write a program for unorder.pdf
 
Create your own Linked list from scratch (singly linked list).So.pdf
Create your own Linked list from scratch (singly linked list).So.pdfCreate your own Linked list from scratch (singly linked list).So.pdf
Create your own Linked list from scratch (singly linked list).So.pdf
 
Discuss about Header Node And also write a program for unordered si.pdf
Discuss about Header Node  And also write a program for unordered si.pdfDiscuss about Header Node  And also write a program for unordered si.pdf
Discuss about Header Node And also write a program for unordered si.pdf
 
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdfInspect the class declaration for a doubly-linked list node in Node-h-.pdf
Inspect the class declaration for a doubly-linked list node in Node-h-.pdf
 
Solve using Java programming language- ----------------------------.pdf
Solve using Java programming language-   ----------------------------.pdfSolve using Java programming language-   ----------------------------.pdf
Solve using Java programming language- ----------------------------.pdf
 
Main-cpp #include -iostream- #include -List-h- int main() { retur.pdf
Main-cpp  #include -iostream- #include -List-h- int main() {     retur.pdfMain-cpp  #include -iostream- #include -List-h- int main() {     retur.pdf
Main-cpp #include -iostream- #include -List-h- int main() { retur.pdf
 
When we first examined the array based and node based implementations.docx
 When we first examined the array based and node based implementations.docx When we first examined the array based and node based implementations.docx
When we first examined the array based and node based implementations.docx
 
Array,lists and hashes in perl
Array,lists and hashes in perlArray,lists and hashes in perl
Array,lists and hashes in perl
 
^^^Q2. Discuss about Header Node    And also write a program fo.pdf
^^^Q2. Discuss about Header Node    And also write a program fo.pdf^^^Q2. Discuss about Header Node    And also write a program fo.pdf
^^^Q2. Discuss about Header Node    And also write a program fo.pdf
 
#include iostream using namespace std; const int nil = 0; cl.docx
#include iostream using namespace std; const int nil = 0; cl.docx#include iostream using namespace std; const int nil = 0; cl.docx
#include iostream using namespace std; const int nil = 0; cl.docx
 

More from aquacosmossystems

DnaAORC This protein is responsible for initiation of DNA replicat.pdf
DnaAORC This protein is responsible for initiation of DNA replicat.pdfDnaAORC This protein is responsible for initiation of DNA replicat.pdf
DnaAORC This protein is responsible for initiation of DNA replicat.pdf
aquacosmossystems
 
Answer(19)Mary’s parents are normal, therefore her brother must.pdf
Answer(19)Mary’s parents are normal, therefore her brother must.pdfAnswer(19)Mary’s parents are normal, therefore her brother must.pdf
Answer(19)Mary’s parents are normal, therefore her brother must.pdf
aquacosmossystems
 
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdf
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdfAnswer Q1. Red mangroove is the last mangroove to colonise on the.pdf
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdf
aquacosmossystems
 
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdfAn Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
aquacosmossystems
 
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdf
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdfAns. One of the main disadvantage is chromatic aberrasion. A more li.pdf
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdf
aquacosmossystems
 
A coordination problem occurs in situations where there is no Nash E.pdf
A coordination problem occurs in situations where there is no Nash E.pdfA coordination problem occurs in situations where there is no Nash E.pdf
A coordination problem occurs in situations where there is no Nash E.pdf
aquacosmossystems
 
1. When an integrated F plasmid leaves the chromosome it may take so.pdf
1. When an integrated F plasmid leaves the chromosome it may take so.pdf1. When an integrated F plasmid leaves the chromosome it may take so.pdf
1. When an integrated F plasmid leaves the chromosome it may take so.pdf
aquacosmossystems
 
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
aquacosmossystems
 
Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
  Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf  Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
aquacosmossystems
 
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
aquacosmossystems
 
SnO2 (ore) is initially washed and dressed. then .pdf
                     SnO2 (ore) is initially washed and dressed. then .pdf                     SnO2 (ore) is initially washed and dressed. then .pdf
SnO2 (ore) is initially washed and dressed. then .pdf
aquacosmossystems
 
d) Valine Note its side chain doesnt contain a.pdf
                     d) Valine Note its side chain doesnt contain a.pdf                     d) Valine Note its side chain doesnt contain a.pdf
d) Valine Note its side chain doesnt contain a.pdf
aquacosmossystems
 
Amphiprotic. The preferred term is amphoteric. A .pdf
                     Amphiprotic. The preferred term is amphoteric. A .pdf                     Amphiprotic. The preferred term is amphoteric. A .pdf
Amphiprotic. The preferred term is amphoteric. A .pdf
aquacosmossystems
 
at equivalence point, Moles OH- added = moles H+.pdf
                     at equivalence point,  Moles OH- added = moles H+.pdf                     at equivalence point,  Moles OH- added = moles H+.pdf
at equivalence point, Moles OH- added = moles H+.pdf
aquacosmossystems
 
We Know that     Water is a Polar component as .pdf
                     We Know that      Water is a Polar component as .pdf                     We Know that      Water is a Polar component as .pdf
We Know that     Water is a Polar component as .pdf
aquacosmossystems
 
molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
                     molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf                     molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
aquacosmossystems
 
What property of PN code makes them suitable for use in spread spect.pdf
What property of PN code makes them suitable for use in spread spect.pdfWhat property of PN code makes them suitable for use in spread spect.pdf
What property of PN code makes them suitable for use in spread spect.pdf
aquacosmossystems
 
TLC can be used to help determine the number of components in a mixt.pdf
TLC can be used to help determine the number of components in a mixt.pdfTLC can be used to help determine the number of components in a mixt.pdf
TLC can be used to help determine the number of components in a mixt.pdf
aquacosmossystems
 
There may have some variables affect the model. So the error term wi.pdf
There may have some variables affect the model. So the error term wi.pdfThere may have some variables affect the model. So the error term wi.pdf
There may have some variables affect the model. So the error term wi.pdf
aquacosmossystems
 
There are four major functional characteristics of skeletal muscle..pdf
There are four major functional characteristics of skeletal muscle..pdfThere are four major functional characteristics of skeletal muscle..pdf
There are four major functional characteristics of skeletal muscle..pdf
aquacosmossystems
 

More from aquacosmossystems (20)

DnaAORC This protein is responsible for initiation of DNA replicat.pdf
DnaAORC This protein is responsible for initiation of DNA replicat.pdfDnaAORC This protein is responsible for initiation of DNA replicat.pdf
DnaAORC This protein is responsible for initiation of DNA replicat.pdf
 
Answer(19)Mary’s parents are normal, therefore her brother must.pdf
Answer(19)Mary’s parents are normal, therefore her brother must.pdfAnswer(19)Mary’s parents are normal, therefore her brother must.pdf
Answer(19)Mary’s parents are normal, therefore her brother must.pdf
 
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdf
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdfAnswer Q1. Red mangroove is the last mangroove to colonise on the.pdf
Answer Q1. Red mangroove is the last mangroove to colonise on the.pdf
 
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdfAn Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
An Arrhenius acid produces H+ ions insolutionA Bronsted-Lowry acid.pdf
 
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdf
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdfAns. One of the main disadvantage is chromatic aberrasion. A more li.pdf
Ans. One of the main disadvantage is chromatic aberrasion. A more li.pdf
 
A coordination problem occurs in situations where there is no Nash E.pdf
A coordination problem occurs in situations where there is no Nash E.pdfA coordination problem occurs in situations where there is no Nash E.pdf
A coordination problem occurs in situations where there is no Nash E.pdf
 
1. When an integrated F plasmid leaves the chromosome it may take so.pdf
1. When an integrated F plasmid leaves the chromosome it may take so.pdf1. When an integrated F plasmid leaves the chromosome it may take so.pdf
1. When an integrated F plasmid leaves the chromosome it may take so.pdf
 
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
1. A DNA molecule contains two strands of poly deoxyribonucleotide s.pdf
 
Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
  Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf  Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
Ethyl 4-aminobenzoate is a basic organic compound. In basic and neut.pdf
 
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
draw a sphere and use raytracing on the sphere in OpenGL glut. .pdf
 
SnO2 (ore) is initially washed and dressed. then .pdf
                     SnO2 (ore) is initially washed and dressed. then .pdf                     SnO2 (ore) is initially washed and dressed. then .pdf
SnO2 (ore) is initially washed and dressed. then .pdf
 
d) Valine Note its side chain doesnt contain a.pdf
                     d) Valine Note its side chain doesnt contain a.pdf                     d) Valine Note its side chain doesnt contain a.pdf
d) Valine Note its side chain doesnt contain a.pdf
 
Amphiprotic. The preferred term is amphoteric. A .pdf
                     Amphiprotic. The preferred term is amphoteric. A .pdf                     Amphiprotic. The preferred term is amphoteric. A .pdf
Amphiprotic. The preferred term is amphoteric. A .pdf
 
at equivalence point, Moles OH- added = moles H+.pdf
                     at equivalence point,  Moles OH- added = moles H+.pdf                     at equivalence point,  Moles OH- added = moles H+.pdf
at equivalence point, Moles OH- added = moles H+.pdf
 
We Know that     Water is a Polar component as .pdf
                     We Know that      Water is a Polar component as .pdf                     We Know that      Water is a Polar component as .pdf
We Know that     Water is a Polar component as .pdf
 
molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
                     molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf                     molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
molar mass of C2H5OH = 46.1 gmole moles of C2H5O.pdf
 
What property of PN code makes them suitable for use in spread spect.pdf
What property of PN code makes them suitable for use in spread spect.pdfWhat property of PN code makes them suitable for use in spread spect.pdf
What property of PN code makes them suitable for use in spread spect.pdf
 
TLC can be used to help determine the number of components in a mixt.pdf
TLC can be used to help determine the number of components in a mixt.pdfTLC can be used to help determine the number of components in a mixt.pdf
TLC can be used to help determine the number of components in a mixt.pdf
 
There may have some variables affect the model. So the error term wi.pdf
There may have some variables affect the model. So the error term wi.pdfThere may have some variables affect the model. So the error term wi.pdf
There may have some variables affect the model. So the error term wi.pdf
 
There are four major functional characteristics of skeletal muscle..pdf
There are four major functional characteristics of skeletal muscle..pdfThere are four major functional characteristics of skeletal muscle..pdf
There are four major functional characteristics of skeletal muscle..pdf
 

Recently uploaded

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

#include node1.h #include list.h #include cassert P.pdf

  • 1. #include "node1.h" #include "list.h" #include // Provides assert #include using namespace std; value_type head(list lst) { list p; p=list_locate(lst,1); return p->data(); } list tail(list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_remove(head); return head; } bool list_is_empty(list lst) { size_t n= list_length(lst); if(n==0) return true; else return false; } list cons(value_type val, const list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_insert(head, val); return head;
  • 2. } Solution #include "node1.h" #include "list.h" #include // Provides assert #include using namespace std; value_type head(list lst) { list p; p=list_locate(lst,1); return p->data(); } list tail(list lst) { node *head=NULL; node *tail=NULL; list_copy(lst, head, tail); list_head_remove(head); return head; } bool list_is_empty(list lst) { size_t n= list_length(lst); if(n==0) return true; else return false; } list cons(value_type val, const list lst) { node *head=NULL; node *tail=NULL;