SlideShare a Scribd company logo
1 of 1
Download to read offline
3.1 You are given a list, L, and another list, P, containing integers sorted in ascending order. The
operation printLots (L,P) will print the elements in L that are in positions specified by P. For
instance, if P=1,3,4,6, the elements in positions 1,3,4, and 6 in L are printed. Write the procedure
printLots (L,P). You may use only the public STL container operations. What is the running time of
your procedure?

More Related Content

More from VANDANASINHACONSULT

4 4 pts In what major sedimentary depositional environmen.pdf
4 4 pts In what major sedimentary depositional environmen.pdf4 4 pts In what major sedimentary depositional environmen.pdf
4 4 pts In what major sedimentary depositional environmen.pdfVANDANASINHACONSULT
 
4 10 pts You have mutated normal epidermal fibroblast cel.pdf
4 10 pts You have mutated normal epidermal fibroblast cel.pdf4 10 pts You have mutated normal epidermal fibroblast cel.pdf
4 10 pts You have mutated normal epidermal fibroblast cel.pdfVANDANASINHACONSULT
 
4 12 points An FA illustrating a simplified version of le.pdf
4 12 points An FA illustrating a simplified version of le.pdf4 12 points An FA illustrating a simplified version of le.pdf
4 12 points An FA illustrating a simplified version of le.pdfVANDANASINHACONSULT
 
4 20 pt Simple linear regression is considered in a data .pdf
4 20 pt Simple linear regression is considered in a data .pdf4 20 pt Simple linear regression is considered in a data .pdf
4 20 pt Simple linear regression is considered in a data .pdfVANDANASINHACONSULT
 
4 2 pts Consider the ER schema for the MOVIES database as.pdf
4 2 pts Consider the ER schema for the MOVIES database as.pdf4 2 pts Consider the ER schema for the MOVIES database as.pdf
4 2 pts Consider the ER schema for the MOVIES database as.pdfVANDANASINHACONSULT
 
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdfVANDANASINHACONSULT
 
3Use Tukeys multiple comparison method to decide among whi.pdf
3Use Tukeys multiple comparison method to decide among whi.pdf3Use Tukeys multiple comparison method to decide among whi.pdf
3Use Tukeys multiple comparison method to decide among whi.pdfVANDANASINHACONSULT
 
329 In the last decade the average age of a mother at chil.pdf
329 In the last decade the average age of a mother at chil.pdf329 In the last decade the average age of a mother at chil.pdf
329 In the last decade the average age of a mother at chil.pdfVANDANASINHACONSULT
 
36 In 1812 an earthquake centered on the San Andreas fault.pdf
36 In 1812 an earthquake centered on the San Andreas fault.pdf36 In 1812 an earthquake centered on the San Andreas fault.pdf
36 In 1812 an earthquake centered on the San Andreas fault.pdfVANDANASINHACONSULT
 
36 Most of the catbon dioxide earried inthe blood is transp.pdf
36 Most of the catbon dioxide earried inthe blood is transp.pdf36 Most of the catbon dioxide earried inthe blood is transp.pdf
36 Most of the catbon dioxide earried inthe blood is transp.pdfVANDANASINHACONSULT
 
36 The kidneys maintain blood fluid volume through the neph.pdf
36 The kidneys maintain blood fluid volume through the neph.pdf36 The kidneys maintain blood fluid volume through the neph.pdf
36 The kidneys maintain blood fluid volume through the neph.pdfVANDANASINHACONSULT
 
319 Let the random variable X have the pdf fx 21x0x.pdf
319 Let the random variable X have the pdf fx 21x0x.pdf319 Let the random variable X have the pdf fx 21x0x.pdf
319 Let the random variable X have the pdf fx 21x0x.pdfVANDANASINHACONSULT
 
35 A 67yearold woman is admitted to the hospital with sev.pdf
35 A 67yearold woman is admitted to the hospital with sev.pdf35 A 67yearold woman is admitted to the hospital with sev.pdf
35 A 67yearold woman is admitted to the hospital with sev.pdfVANDANASINHACONSULT
 
34 Why are teloyears DNA test not an accurate way to predi.pdf
34 Why are teloyears DNA test not an accurate way to predi.pdf34 Why are teloyears DNA test not an accurate way to predi.pdf
34 Why are teloyears DNA test not an accurate way to predi.pdfVANDANASINHACONSULT
 
32 Bowenn kamu mallar taleplerini temsil eden modeli A .pdf
32 Bowenn kamu mallar taleplerini temsil eden modeli  A .pdf32 Bowenn kamu mallar taleplerini temsil eden modeli  A .pdf
32 Bowenn kamu mallar taleplerini temsil eden modeli A .pdfVANDANASINHACONSULT
 
34 A 42yearold woman is admitted to the hospital due to b.pdf
34 A 42yearold woman is admitted to the hospital due to b.pdf34 A 42yearold woman is admitted to the hospital due to b.pdf
34 A 42yearold woman is admitted to the hospital due to b.pdfVANDANASINHACONSULT
 
35 In Human Resources and Job Design Labor Standards a wo.pdf
35   In Human Resources and Job Design Labor Standards a wo.pdf35   In Human Resources and Job Design Labor Standards a wo.pdf
35 In Human Resources and Job Design Labor Standards a wo.pdfVANDANASINHACONSULT
 
334 LAB Output range with increment of 5 Write a program w.pdf
334 LAB Output range with increment of 5 Write a program w.pdf334 LAB Output range with increment of 5 Write a program w.pdf
334 LAB Output range with increment of 5 Write a program w.pdfVANDANASINHACONSULT
 
35 of all college students major in STEM Science Technolo.pdf
35 of all college students major in STEM Science Technolo.pdf35 of all college students major in STEM Science Technolo.pdf
35 of all college students major in STEM Science Technolo.pdfVANDANASINHACONSULT
 
31 The rosterene abdominal A fusiorm parallel musle wils.pdf
31 The rosterene abdominal A fusiorm parallel musle wils.pdf31 The rosterene abdominal A fusiorm parallel musle wils.pdf
31 The rosterene abdominal A fusiorm parallel musle wils.pdfVANDANASINHACONSULT
 

More from VANDANASINHACONSULT (20)

4 4 pts In what major sedimentary depositional environmen.pdf
4 4 pts In what major sedimentary depositional environmen.pdf4 4 pts In what major sedimentary depositional environmen.pdf
4 4 pts In what major sedimentary depositional environmen.pdf
 
4 10 pts You have mutated normal epidermal fibroblast cel.pdf
4 10 pts You have mutated normal epidermal fibroblast cel.pdf4 10 pts You have mutated normal epidermal fibroblast cel.pdf
4 10 pts You have mutated normal epidermal fibroblast cel.pdf
 
4 12 points An FA illustrating a simplified version of le.pdf
4 12 points An FA illustrating a simplified version of le.pdf4 12 points An FA illustrating a simplified version of le.pdf
4 12 points An FA illustrating a simplified version of le.pdf
 
4 20 pt Simple linear regression is considered in a data .pdf
4 20 pt Simple linear regression is considered in a data .pdf4 20 pt Simple linear regression is considered in a data .pdf
4 20 pt Simple linear regression is considered in a data .pdf
 
4 2 pts Consider the ER schema for the MOVIES database as.pdf
4 2 pts Consider the ER schema for the MOVIES database as.pdf4 2 pts Consider the ER schema for the MOVIES database as.pdf
4 2 pts Consider the ER schema for the MOVIES database as.pdf
 
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf
4 10 Percent Ryan Enterprises forecasts the free cash flo.pdf
 
3Use Tukeys multiple comparison method to decide among whi.pdf
3Use Tukeys multiple comparison method to decide among whi.pdf3Use Tukeys multiple comparison method to decide among whi.pdf
3Use Tukeys multiple comparison method to decide among whi.pdf
 
329 In the last decade the average age of a mother at chil.pdf
329 In the last decade the average age of a mother at chil.pdf329 In the last decade the average age of a mother at chil.pdf
329 In the last decade the average age of a mother at chil.pdf
 
36 In 1812 an earthquake centered on the San Andreas fault.pdf
36 In 1812 an earthquake centered on the San Andreas fault.pdf36 In 1812 an earthquake centered on the San Andreas fault.pdf
36 In 1812 an earthquake centered on the San Andreas fault.pdf
 
36 Most of the catbon dioxide earried inthe blood is transp.pdf
36 Most of the catbon dioxide earried inthe blood is transp.pdf36 Most of the catbon dioxide earried inthe blood is transp.pdf
36 Most of the catbon dioxide earried inthe blood is transp.pdf
 
36 The kidneys maintain blood fluid volume through the neph.pdf
36 The kidneys maintain blood fluid volume through the neph.pdf36 The kidneys maintain blood fluid volume through the neph.pdf
36 The kidneys maintain blood fluid volume through the neph.pdf
 
319 Let the random variable X have the pdf fx 21x0x.pdf
319 Let the random variable X have the pdf fx 21x0x.pdf319 Let the random variable X have the pdf fx 21x0x.pdf
319 Let the random variable X have the pdf fx 21x0x.pdf
 
35 A 67yearold woman is admitted to the hospital with sev.pdf
35 A 67yearold woman is admitted to the hospital with sev.pdf35 A 67yearold woman is admitted to the hospital with sev.pdf
35 A 67yearold woman is admitted to the hospital with sev.pdf
 
34 Why are teloyears DNA test not an accurate way to predi.pdf
34 Why are teloyears DNA test not an accurate way to predi.pdf34 Why are teloyears DNA test not an accurate way to predi.pdf
34 Why are teloyears DNA test not an accurate way to predi.pdf
 
32 Bowenn kamu mallar taleplerini temsil eden modeli A .pdf
32 Bowenn kamu mallar taleplerini temsil eden modeli  A .pdf32 Bowenn kamu mallar taleplerini temsil eden modeli  A .pdf
32 Bowenn kamu mallar taleplerini temsil eden modeli A .pdf
 
34 A 42yearold woman is admitted to the hospital due to b.pdf
34 A 42yearold woman is admitted to the hospital due to b.pdf34 A 42yearold woman is admitted to the hospital due to b.pdf
34 A 42yearold woman is admitted to the hospital due to b.pdf
 
35 In Human Resources and Job Design Labor Standards a wo.pdf
35   In Human Resources and Job Design Labor Standards a wo.pdf35   In Human Resources and Job Design Labor Standards a wo.pdf
35 In Human Resources and Job Design Labor Standards a wo.pdf
 
334 LAB Output range with increment of 5 Write a program w.pdf
334 LAB Output range with increment of 5 Write a program w.pdf334 LAB Output range with increment of 5 Write a program w.pdf
334 LAB Output range with increment of 5 Write a program w.pdf
 
35 of all college students major in STEM Science Technolo.pdf
35 of all college students major in STEM Science Technolo.pdf35 of all college students major in STEM Science Technolo.pdf
35 of all college students major in STEM Science Technolo.pdf
 
31 The rosterene abdominal A fusiorm parallel musle wils.pdf
31 The rosterene abdominal A fusiorm parallel musle wils.pdf31 The rosterene abdominal A fusiorm parallel musle wils.pdf
31 The rosterene abdominal A fusiorm parallel musle wils.pdf
 

Recently uploaded

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
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
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
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
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
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
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

31 You are given a list L and another list P containing.pdf

  • 1. 3.1 You are given a list, L, and another list, P, containing integers sorted in ascending order. The operation printLots (L,P) will print the elements in L that are in positions specified by P. For instance, if P=1,3,4,6, the elements in positions 1,3,4, and 6 in L are printed. Write the procedure printLots (L,P). You may use only the public STL container operations. What is the running time of your procedure?