SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
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!)

Contenu connexe

Plus de shakeelkhan911

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
shakeelkhan911
 
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
shakeelkhan911
 
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
shakeelkhan911
 

Plus de 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
 

Dernier

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
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
heathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Dernier (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
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 ...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

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!)