SlideShare a Scribd company logo
1 of 1
Download to read offline
b) State the advantages of expressing an algorithm in pseudo-code. Hence, represent the Quick
Sort algorithm in pseudo-code form. (4 marks) c) Using the pseudo-code in part (b), code the
Quick Sort algorithm in Python or C++ and use it to sort the array of numbers given in part (a).
You must indent and comment each line of your code. (Note: The code must be copied and
pasted into the report. Also you may be asked to explain your code in person to verify that it is
your own code!)

More Related Content

More from shakeelkhan911

B cells present antigen to activated (effector) CD4 +T helper cells i.pdf
 B cells present antigen to activated (effector) CD4 +T helper cells i.pdf B cells present antigen to activated (effector) CD4 +T helper cells i.pdf
B cells present antigen to activated (effector) CD4 +T helper cells i.pdfshakeelkhan911
 
Based on the PDF and the video, which of the following statements is .pdf
 Based on the PDF and the video, which of the following statements is .pdf Based on the PDF and the video, which of the following statements is .pdf
Based on the PDF and the video, which of the following statements is .pdfshakeelkhan911
 
bearing higher affinity B cell receptors are selected to survive in t.pdf
 bearing higher affinity B cell receptors are selected to survive in t.pdf bearing higher affinity B cell receptors are selected to survive in t.pdf
bearing higher affinity B cell receptors are selected to survive in t.pdfshakeelkhan911
 
Based on the Ethical Development Framework material covered in this c.pdf
 Based on the Ethical Development Framework material covered in this c.pdf Based on the Ethical Development Framework material covered in this c.pdf
Based on the Ethical Development Framework material covered in this c.pdfshakeelkhan911
 
Atmospheric escape speed (or escape velocity) means the speed of.pdf
 Atmospheric escape speed (or escape velocity) means the speed of.pdf Atmospheric escape speed (or escape velocity) means the speed of.pdf
Atmospheric escape speed (or escape velocity) means the speed of.pdfshakeelkhan911
 
atsy Manufacturing creates a master budget that includes budgets for .pdf
 atsy Manufacturing creates a master budget that includes budgets for .pdf atsy Manufacturing creates a master budget that includes budgets for .pdf
atsy Manufacturing creates a master budget that includes budgets for .pdfshakeelkhan911
 
At your school, the third grade classes have just finished planning.pdf
 At your school, the third grade classes have just finished planning.pdf At your school, the third grade classes have just finished planning.pdf
At your school, the third grade classes have just finished planning.pdfshakeelkhan911
 
Background Julie Martin has completed a preliminary investigation and.pdf
 Background Julie Martin has completed a preliminary investigation and.pdf Background Julie Martin has completed a preliminary investigation and.pdf
Background Julie Martin has completed a preliminary investigation and.pdfshakeelkhan911
 
Background You have been hired by the finance minister of small count.pdf
 Background You have been hired by the finance minister of small count.pdf Background You have been hired by the finance minister of small count.pdf
Background You have been hired by the finance minister of small count.pdfshakeelkhan911
 
Background Sea otters are one of the few cute and cuddly creature.pdf
 Background Sea otters are one of the few cute and cuddly creature.pdf Background Sea otters are one of the few cute and cuddly creature.pdf
Background Sea otters are one of the few cute and cuddly creature.pdfshakeelkhan911
 
b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf
 b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf
b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdfshakeelkhan911
 
B cell development - match the following Early Pro-B cell A. Heavy C.pdf
 B cell development - match the following Early Pro-B cell A. Heavy C.pdf B cell development - match the following Early Pro-B cell A. Heavy C.pdf
B cell development - match the following Early Pro-B cell A. Heavy C.pdfshakeelkhan911
 
b. Use Fishers LSD procedure to test whether there is a significant .pdf
 b. Use Fishers LSD procedure to test whether there is a significant .pdf b. Use Fishers LSD procedure to test whether there is a significant .pdf
b. Use Fishers LSD procedure to test whether there is a significant .pdfshakeelkhan911
 
B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf
 B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf
B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdfshakeelkhan911
 
b) What is the probability that he or she watches TV more than 12 hou.pdf
 b) What is the probability that he or she watches TV more than 12 hou.pdf b) What is the probability that he or she watches TV more than 12 hou.pdf
b) What is the probability that he or she watches TV more than 12 hou.pdfshakeelkhan911
 

More from shakeelkhan911 (15)

B cells present antigen to activated (effector) CD4 +T helper cells i.pdf
 B cells present antigen to activated (effector) CD4 +T helper cells i.pdf B cells present antigen to activated (effector) CD4 +T helper cells i.pdf
B cells present antigen to activated (effector) CD4 +T helper cells i.pdf
 
Based on the PDF and the video, which of the following statements is .pdf
 Based on the PDF and the video, which of the following statements is .pdf Based on the PDF and the video, which of the following statements is .pdf
Based on the PDF and the video, which of the following statements is .pdf
 
bearing higher affinity B cell receptors are selected to survive in t.pdf
 bearing higher affinity B cell receptors are selected to survive in t.pdf bearing higher affinity B cell receptors are selected to survive in t.pdf
bearing higher affinity B cell receptors are selected to survive in t.pdf
 
Based on the Ethical Development Framework material covered in this c.pdf
 Based on the Ethical Development Framework material covered in this c.pdf Based on the Ethical Development Framework material covered in this c.pdf
Based on the Ethical Development Framework material covered in this c.pdf
 
Atmospheric escape speed (or escape velocity) means the speed of.pdf
 Atmospheric escape speed (or escape velocity) means the speed of.pdf Atmospheric escape speed (or escape velocity) means the speed of.pdf
Atmospheric escape speed (or escape velocity) means the speed of.pdf
 
atsy Manufacturing creates a master budget that includes budgets for .pdf
 atsy Manufacturing creates a master budget that includes budgets for .pdf atsy Manufacturing creates a master budget that includes budgets for .pdf
atsy Manufacturing creates a master budget that includes budgets for .pdf
 
At your school, the third grade classes have just finished planning.pdf
 At your school, the third grade classes have just finished planning.pdf At your school, the third grade classes have just finished planning.pdf
At your school, the third grade classes have just finished planning.pdf
 
Background Julie Martin has completed a preliminary investigation and.pdf
 Background Julie Martin has completed a preliminary investigation and.pdf Background Julie Martin has completed a preliminary investigation and.pdf
Background Julie Martin has completed a preliminary investigation and.pdf
 
Background You have been hired by the finance minister of small count.pdf
 Background You have been hired by the finance minister of small count.pdf Background You have been hired by the finance minister of small count.pdf
Background You have been hired by the finance minister of small count.pdf
 
Background Sea otters are one of the few cute and cuddly creature.pdf
 Background Sea otters are one of the few cute and cuddly creature.pdf Background Sea otters are one of the few cute and cuddly creature.pdf
Background Sea otters are one of the few cute and cuddly creature.pdf
 
b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf
 b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf
b) Develop a CFG for the language anbn(anb2na2nbn)n0, [o is the conc.pdf
 
B cell development - match the following Early Pro-B cell A. Heavy C.pdf
 B cell development - match the following Early Pro-B cell A. Heavy C.pdf B cell development - match the following Early Pro-B cell A. Heavy C.pdf
B cell development - match the following Early Pro-B cell A. Heavy C.pdf
 
b. Use Fishers LSD procedure to test whether there is a significant .pdf
 b. Use Fishers LSD procedure to test whether there is a significant .pdf b. Use Fishers LSD procedure to test whether there is a significant .pdf
b. Use Fishers LSD procedure to test whether there is a significant .pdf
 
B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf
 B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf
B. Apeeshably noersal because n st otW and orit - the not D. Not mome.pdf
 
b) What is the probability that he or she watches TV more than 12 hou.pdf
 b) What is the probability that he or she watches TV more than 12 hou.pdf b) What is the probability that he or she watches TV more than 12 hou.pdf
b) What is the probability that he or she watches TV more than 12 hou.pdf
 

Recently uploaded

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
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
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
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
 
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
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
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
 
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
 
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
 
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
 
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
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 

Recently uploaded (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
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
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
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
 
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
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
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
 
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
 
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
 
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
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 

b) State the advantages of expressing an algorithm in pseudo-code. He.pdf

  • 1. b) State the advantages of expressing an algorithm in pseudo-code. Hence, represent the Quick Sort algorithm in pseudo-code form. (4 marks) c) Using the pseudo-code in part (b), code the Quick Sort algorithm in Python or C++ and use it to sort the array of numbers given in part (a). You must indent and comment each line of your code. (Note: The code must be copied and pasted into the report. Also you may be asked to explain your code in person to verify that it is your own code!)