SlideShare a Scribd company logo
1 of 1
Download to read offline
Must be in C++ programming
The main objective of this experiment is to gain experience in implementing Data Structures of
Stacks and Queues. Task 1: Implement a stack using a singly linked list L. The operations PUSH
and POP should still take O(1) time. Task 2: Implement a queue by a singly linked list L. The
operations ENQUEUE and DEQUEUE should still take O(1) time. Task 3: Rewrite ENQUEUE
and DEQUEUE from Task 2 to detect the underflow and overflow of the queue. Task 4:
Implement a stack using two queues and analyze the running times of stack operations. Output
Instructions: The output includes a user interface where the user indicates the number of
elements to en/dequeue and/or push/pop.

More Related Content

More from saxenaavnish1

Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdf
Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdfMichael leases a Lucerne farm to Boaz for a term of three years. Aft.pdf
Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdfsaxenaavnish1
 
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdf
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdfme quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdf
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdfsaxenaavnish1
 
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdf
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdfMendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdf
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdfsaxenaavnish1
 
MCQ Select the correct answer.1. What does SQL stand fora.pdf
MCQ  Select the correct answer.1. What does SQL stand fora.pdfMCQ  Select the correct answer.1. What does SQL stand fora.pdf
MCQ Select the correct answer.1. What does SQL stand fora.pdfsaxenaavnish1
 
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdf
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdfMCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdf
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdfsaxenaavnish1
 
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdf
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdfMegan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdf
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdfsaxenaavnish1
 
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdf
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdfmedia luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdf
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdfsaxenaavnish1
 
my code doesnt work can you help me please the whole idea of is it i.pdf
my code doesnt work can you help me please the whole idea of is it i.pdfmy code doesnt work can you help me please the whole idea of is it i.pdf
my code doesnt work can you help me please the whole idea of is it i.pdfsaxenaavnish1
 
MUS monetary unit samplingA) What is the planned sample sizeB).pdf
MUS monetary unit samplingA) What is the planned sample sizeB).pdfMUS monetary unit samplingA) What is the planned sample sizeB).pdf
MUS monetary unit samplingA) What is the planned sample sizeB).pdfsaxenaavnish1
 
Multifactor authentication (MFA) requires users to authenticate thei.pdf
Multifactor authentication (MFA) requires users to authenticate thei.pdfMultifactor authentication (MFA) requires users to authenticate thei.pdf
Multifactor authentication (MFA) requires users to authenticate thei.pdfsaxenaavnish1
 
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdf
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdfMTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdf
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdfsaxenaavnish1
 
Multiple Choice � Choose the BEST answer for each question below.1.pdf
Multiple Choice � Choose the BEST answer for each question below.1.pdfMultiple Choice � Choose the BEST answer for each question below.1.pdf
Multiple Choice � Choose the BEST answer for each question below.1.pdfsaxenaavnish1
 
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdf
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdfMuchos centros de llamadas que brindan servicios telef�nicos al clie.pdf
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdfsaxenaavnish1
 
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdf
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdfMultiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdf
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdfsaxenaavnish1
 
Motivation describes why the employee does the job, and Job Satisfac.pdf
Motivation describes why the employee does the job, and Job Satisfac.pdfMotivation describes why the employee does the job, and Job Satisfac.pdf
Motivation describes why the employee does the job, and Job Satisfac.pdfsaxenaavnish1
 
Move a knight Its name is move_knightIt takes three arguments the.pdf
Move a knight Its name is move_knightIt takes three arguments the.pdfMove a knight Its name is move_knightIt takes three arguments the.pdf
Move a knight Its name is move_knightIt takes three arguments the.pdfsaxenaavnish1
 
Most Americans have negative perceptions of the people and places .pdf
Most Americans have negative perceptions of the people and places .pdfMost Americans have negative perceptions of the people and places .pdf
Most Americans have negative perceptions of the people and places .pdfsaxenaavnish1
 
mrs. burkes chemistry class has 111 students, classified by academic.pdf
mrs. burkes chemistry class has 111 students, classified by academic.pdfmrs. burkes chemistry class has 111 students, classified by academic.pdf
mrs. burkes chemistry class has 111 students, classified by academic.pdfsaxenaavnish1
 
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdf
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdfMr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdf
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdfsaxenaavnish1
 
Morgan and his students used chemicals and radiation to induce rando.pdf
Morgan and his students used chemicals and radiation to induce rando.pdfMorgan and his students used chemicals and radiation to induce rando.pdf
Morgan and his students used chemicals and radiation to induce rando.pdfsaxenaavnish1
 

More from saxenaavnish1 (20)

Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdf
Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdfMichael leases a Lucerne farm to Boaz for a term of three years. Aft.pdf
Michael leases a Lucerne farm to Boaz for a term of three years. Aft.pdf
 
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdf
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdfme quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdf
me quedan 35 munites por favor ayudenme Art�culo 1 En el caso .pdf
 
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdf
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdfMendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdf
Mendel logr� descubrir las leyes b�sicas de la herencia, mientras qu.pdf
 
MCQ Select the correct answer.1. What does SQL stand fora.pdf
MCQ  Select the correct answer.1. What does SQL stand fora.pdfMCQ  Select the correct answer.1. What does SQL stand fora.pdf
MCQ Select the correct answer.1. What does SQL stand fora.pdf
 
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdf
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdfMCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdf
MCQ Pls Help ACC495 Corporate Governance and Risk Management Which .pdf
 
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdf
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdfMegan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdf
Megan se gradu� de la universidad hace tres a�os y ha estado trabaja.pdf
 
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdf
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdfmedia luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdf
media luna pura Sarah Ryan, vicepresidenta de marketing de Portlan.pdf
 
my code doesnt work can you help me please the whole idea of is it i.pdf
my code doesnt work can you help me please the whole idea of is it i.pdfmy code doesnt work can you help me please the whole idea of is it i.pdf
my code doesnt work can you help me please the whole idea of is it i.pdf
 
MUS monetary unit samplingA) What is the planned sample sizeB).pdf
MUS monetary unit samplingA) What is the planned sample sizeB).pdfMUS monetary unit samplingA) What is the planned sample sizeB).pdf
MUS monetary unit samplingA) What is the planned sample sizeB).pdf
 
Multifactor authentication (MFA) requires users to authenticate thei.pdf
Multifactor authentication (MFA) requires users to authenticate thei.pdfMultifactor authentication (MFA) requires users to authenticate thei.pdf
Multifactor authentication (MFA) requires users to authenticate thei.pdf
 
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdf
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdfMTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdf
MTCR es una empresa l�der en el desarrollo y fabricaci�n de una ampl.pdf
 
Multiple Choice � Choose the BEST answer for each question below.1.pdf
Multiple Choice � Choose the BEST answer for each question below.1.pdfMultiple Choice � Choose the BEST answer for each question below.1.pdf
Multiple Choice � Choose the BEST answer for each question below.1.pdf
 
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdf
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdfMuchos centros de llamadas que brindan servicios telef�nicos al clie.pdf
Muchos centros de llamadas que brindan servicios telef�nicos al clie.pdf
 
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdf
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdfMultiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdf
Multiple choice 1.PHP stands for .A. Hypertext Preprocessor2.V.pdf
 
Motivation describes why the employee does the job, and Job Satisfac.pdf
Motivation describes why the employee does the job, and Job Satisfac.pdfMotivation describes why the employee does the job, and Job Satisfac.pdf
Motivation describes why the employee does the job, and Job Satisfac.pdf
 
Move a knight Its name is move_knightIt takes three arguments the.pdf
Move a knight Its name is move_knightIt takes three arguments the.pdfMove a knight Its name is move_knightIt takes three arguments the.pdf
Move a knight Its name is move_knightIt takes three arguments the.pdf
 
Most Americans have negative perceptions of the people and places .pdf
Most Americans have negative perceptions of the people and places .pdfMost Americans have negative perceptions of the people and places .pdf
Most Americans have negative perceptions of the people and places .pdf
 
mrs. burkes chemistry class has 111 students, classified by academic.pdf
mrs. burkes chemistry class has 111 students, classified by academic.pdfmrs. burkes chemistry class has 111 students, classified by academic.pdf
mrs. burkes chemistry class has 111 students, classified by academic.pdf
 
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdf
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdfMr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdf
Mr. and Mrs. Faurah, an immigrant couple in their early 70�s, have b.pdf
 
Morgan and his students used chemicals and radiation to induce rando.pdf
Morgan and his students used chemicals and radiation to induce rando.pdfMorgan and his students used chemicals and radiation to induce rando.pdf
Morgan and his students used chemicals and radiation to induce rando.pdf
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
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
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Must be in C++ programming The main objective of this experiment i.pdf

  • 1. Must be in C++ programming The main objective of this experiment is to gain experience in implementing Data Structures of Stacks and Queues. Task 1: Implement a stack using a singly linked list L. The operations PUSH and POP should still take O(1) time. Task 2: Implement a queue by a singly linked list L. The operations ENQUEUE and DEQUEUE should still take O(1) time. Task 3: Rewrite ENQUEUE and DEQUEUE from Task 2 to detect the underflow and overflow of the queue. Task 4: Implement a stack using two queues and analyze the running times of stack operations. Output Instructions: The output includes a user interface where the user indicates the number of elements to en/dequeue and/or push/pop.