SlideShare a Scribd company logo
1 of 1
Download to read offline
7. Consider using "in place" (i.e. no extra space used) quicksort and always taking the last
element as pivot to sort the list 9,5,4,8,2,0,7,6. (a) What are the input parameters to the first three
recursive calls to quicksort (i.e. exclude the initial call, which is quicksort(list, 0,7) )? (b) What is
the state of the list right before the fourth recursive call to quicksort? Make sure to use the
algorithm presented in class.

More Related Content

More from atc71jaipur

6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf
 6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf 6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf
6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdfatc71jaipur
 
8) (Essay) Answer the following questions about Veblen (please provid.pdf
 8) (Essay) Answer the following questions about Veblen (please provid.pdf 8) (Essay) Answer the following questions about Veblen (please provid.pdf
8) (Essay) Answer the following questions about Veblen (please provid.pdfatc71jaipur
 
7. Which of the following statements about the U.S. Census is incorre.pdf
 7. Which of the following statements about the U.S. Census is incorre.pdf 7. Which of the following statements about the U.S. Census is incorre.pdf
7. Which of the following statements about the U.S. Census is incorre.pdfatc71jaipur
 
A manufacturing company that produces a single product has provided t.pdf
 A manufacturing company that produces a single product has provided t.pdf A manufacturing company that produces a single product has provided t.pdf
A manufacturing company that produces a single product has provided t.pdfatc71jaipur
 
A hypothetical population consists of eight individuals ages 13,14,17.pdf
 A hypothetical population consists of eight individuals ages 13,14,17.pdf A hypothetical population consists of eight individuals ages 13,14,17.pdf
A hypothetical population consists of eight individuals ages 13,14,17.pdfatc71jaipur
 
A European call option on a non-dividend-paying stock has a market pr.pdf
 A European call option on a non-dividend-paying stock has a market pr.pdf A European call option on a non-dividend-paying stock has a market pr.pdf
A European call option on a non-dividend-paying stock has a market pr.pdfatc71jaipur
 
A company based in the United Kingdom has an Italian subsidiary. The .pdf
 A company based in the United Kingdom has an Italian subsidiary. The .pdf A company based in the United Kingdom has an Italian subsidiary. The .pdf
A company based in the United Kingdom has an Italian subsidiary. The .pdfatc71jaipur
 
A contractors project being analyzed by PERT has an estimated time f.pdf
 A contractors project being analyzed by PERT has an estimated time f.pdf A contractors project being analyzed by PERT has an estimated time f.pdf
A contractors project being analyzed by PERT has an estimated time f.pdfatc71jaipur
 
8. A series of mutant strains (af) of a particular mold are not able .pdf
 8. A series of mutant strains (af) of a particular mold are not able .pdf 8. A series of mutant strains (af) of a particular mold are not able .pdf
8. A series of mutant strains (af) of a particular mold are not able .pdfatc71jaipur
 
6. Let X1,X2,�,Xn be iid RVs with mean and finite variance. What is .pdf
 6. Let X1,X2,�,Xn be iid RVs with mean  and finite variance. What is .pdf 6. Let X1,X2,�,Xn be iid RVs with mean  and finite variance. What is .pdf
6. Let X1,X2,�,Xn be iid RVs with mean and finite variance. What is .pdfatc71jaipur
 
A basic assumption of activity-based costing (ABC) is that All manufa.pdf
 A basic assumption of activity-based costing (ABC) is that All manufa.pdf A basic assumption of activity-based costing (ABC) is that All manufa.pdf
A basic assumption of activity-based costing (ABC) is that All manufa.pdfatc71jaipur
 
9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf
 9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf 9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf
9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdfatc71jaipur
 
A fibers can inhibit transmission of painful stimuli by activating o.pdf
 A  fibers can inhibit transmission of painful stimuli by activating o.pdf A  fibers can inhibit transmission of painful stimuli by activating o.pdf
A fibers can inhibit transmission of painful stimuli by activating o.pdfatc71jaipur
 
9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf
 9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf 9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf
9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdfatc71jaipur
 
9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf
 9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf 9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf
9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdfatc71jaipur
 
9. Private solutions to correct for externalities Consider the follow.pdf
 9. Private solutions to correct for externalities Consider the follow.pdf 9. Private solutions to correct for externalities Consider the follow.pdf
9. Private solutions to correct for externalities Consider the follow.pdfatc71jaipur
 
9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf
 9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf 9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf
9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdfatc71jaipur
 
9. Information about the cause of death listed on a death certificate.pdf
 9. Information about the cause of death listed on a death certificate.pdf 9. Information about the cause of death listed on a death certificate.pdf
9. Information about the cause of death listed on a death certificate.pdfatc71jaipur
 

More from atc71jaipur (18)

6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf
 6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf 6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf
6. Bar eye in Drosophila is an X-linked characteristic in which bar e.pdf
 
8) (Essay) Answer the following questions about Veblen (please provid.pdf
 8) (Essay) Answer the following questions about Veblen (please provid.pdf 8) (Essay) Answer the following questions about Veblen (please provid.pdf
8) (Essay) Answer the following questions about Veblen (please provid.pdf
 
7. Which of the following statements about the U.S. Census is incorre.pdf
 7. Which of the following statements about the U.S. Census is incorre.pdf 7. Which of the following statements about the U.S. Census is incorre.pdf
7. Which of the following statements about the U.S. Census is incorre.pdf
 
A manufacturing company that produces a single product has provided t.pdf
 A manufacturing company that produces a single product has provided t.pdf A manufacturing company that produces a single product has provided t.pdf
A manufacturing company that produces a single product has provided t.pdf
 
A hypothetical population consists of eight individuals ages 13,14,17.pdf
 A hypothetical population consists of eight individuals ages 13,14,17.pdf A hypothetical population consists of eight individuals ages 13,14,17.pdf
A hypothetical population consists of eight individuals ages 13,14,17.pdf
 
A European call option on a non-dividend-paying stock has a market pr.pdf
 A European call option on a non-dividend-paying stock has a market pr.pdf A European call option on a non-dividend-paying stock has a market pr.pdf
A European call option on a non-dividend-paying stock has a market pr.pdf
 
A company based in the United Kingdom has an Italian subsidiary. The .pdf
 A company based in the United Kingdom has an Italian subsidiary. The .pdf A company based in the United Kingdom has an Italian subsidiary. The .pdf
A company based in the United Kingdom has an Italian subsidiary. The .pdf
 
A contractors project being analyzed by PERT has an estimated time f.pdf
 A contractors project being analyzed by PERT has an estimated time f.pdf A contractors project being analyzed by PERT has an estimated time f.pdf
A contractors project being analyzed by PERT has an estimated time f.pdf
 
8. A series of mutant strains (af) of a particular mold are not able .pdf
 8. A series of mutant strains (af) of a particular mold are not able .pdf 8. A series of mutant strains (af) of a particular mold are not able .pdf
8. A series of mutant strains (af) of a particular mold are not able .pdf
 
6. Let X1,X2,�,Xn be iid RVs with mean and finite variance. What is .pdf
 6. Let X1,X2,�,Xn be iid RVs with mean  and finite variance. What is .pdf 6. Let X1,X2,�,Xn be iid RVs with mean  and finite variance. What is .pdf
6. Let X1,X2,�,Xn be iid RVs with mean and finite variance. What is .pdf
 
A basic assumption of activity-based costing (ABC) is that All manufa.pdf
 A basic assumption of activity-based costing (ABC) is that All manufa.pdf A basic assumption of activity-based costing (ABC) is that All manufa.pdf
A basic assumption of activity-based costing (ABC) is that All manufa.pdf
 
9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf
 9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf 9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf
9.6 Computer Fraud and Abuse Techniques. Match the computer f.pdf
 
A fibers can inhibit transmission of painful stimuli by activating o.pdf
 A  fibers can inhibit transmission of painful stimuli by activating o.pdf A  fibers can inhibit transmission of painful stimuli by activating o.pdf
A fibers can inhibit transmission of painful stimuli by activating o.pdf
 
9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf
 9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf 9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf
9.5 hs-Doubly-linked Lists - listTraverse Description In this assignm.pdf
 
9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf
 9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf 9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf
9.4 Computer Fraud and Abuse Techniques. Match the Internet-relat.pdf
 
9. Private solutions to correct for externalities Consider the follow.pdf
 9. Private solutions to correct for externalities Consider the follow.pdf 9. Private solutions to correct for externalities Consider the follow.pdf
9. Private solutions to correct for externalities Consider the follow.pdf
 
9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf
 9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf 9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf
9. In Darcys Law; Q=KiA Explain in simple words what each of the let.pdf
 
9. Information about the cause of death listed on a death certificate.pdf
 9. Information about the cause of death listed on a death certificate.pdf 9. Information about the cause of death listed on a death certificate.pdf
9. Information about the cause of death listed on a death certificate.pdf
 

Recently uploaded

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
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
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 

Recently uploaded (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
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
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
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
 
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
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 

7. Consider using in place (i.e. no extra space used) quicksort and.pdf

  • 1. 7. Consider using "in place" (i.e. no extra space used) quicksort and always taking the last element as pivot to sort the list 9,5,4,8,2,0,7,6. (a) What are the input parameters to the first three recursive calls to quicksort (i.e. exclude the initial call, which is quicksort(list, 0,7) )? (b) What is the state of the list right before the fourth recursive call to quicksort? Make sure to use the algorithm presented in class.