SlideShare a Scribd company logo
1 of 1
Download to read offline
use python Problem 2. Selection Sort In this problem you will implement a function to sort a list
of integers or floats in non-decreasing order using the selection sort algorithm. The idea of
Selection of Sort is as follows. To sort a length- n list L=[L[0],,L[n1]] : 1. Find the index
minIndex of smallest element in L (find the index of first occurrence if you have more than one
element equal to the min). 2. Exchange L[ minIndex] (swap it) with L[0], hence now L[0] is the
(a) smallest element of L, i.e., the number stored in L[0] is in its correct position in the desired
sorted order 3. Find the index minIndex of the smallest element in [L[1],,L[n1]] 4. Exchange L[
minIndex] with L[1], hence now L[1] is the (a) second smallest element of L, i.e., the number
stored in L[1] is in its correct position in the desired sorted order. 5. Find the index minIndex of
the smallest element in [L[2],,L[n1]] 6. Exchange L[ minIndex] with L[2], hence now L[2] is the
(a) third smallest element of L, i.e., the number stored in L[2] is in its correct position in the
desired sorted order. 7. And so on until the whole list L is sorted You will implement this
algorithm in Part (c), but first you will try it on an example in part (a) and you will implement a
function to do Steps 1,3,5, in Part (b). a) Try it on an example. Illustrate the algorithm on
L=[5,2,4,6,1,3]. There is no need to submit this part. b) Function to find the index of min.
Implement a function index0fMin(L, start, end), which takes as input arguments a list L of
integers or floats and two indices start and end such that 0 start end

More Related Content

Similar to use python Problem 2. Selection Sort In this problem you will implem.pdf

Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov
ย 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structurestudent
ย 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
ย 
11 Introduction to lists.pptx
11 Introduction to lists.pptx11 Introduction to lists.pptx
11 Introduction to lists.pptxssuser8e50d8
ย 
Data Structure Searching.pptx
Data Structure Searching.pptxData Structure Searching.pptx
Data Structure Searching.pptxSourabhTaneja4
ย 
1 D Arrays in C++
1 D Arrays in C++1 D Arrays in C++
1 D Arrays in C++poonam.rwalia
ย 
ds 2Arrays.ppt
ds 2Arrays.pptds 2Arrays.ppt
ds 2Arrays.pptAlliVinay1
ย 
โ€โ€chap6 list tuples.pptx
โ€โ€chap6 list tuples.pptxโ€โ€chap6 list tuples.pptx
โ€โ€chap6 list tuples.pptxRamiHarrathi1
ย 
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHIBCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHISowmya Jyothi
ย 
Data structures: linear lists
Data structures: linear listsData structures: linear lists
Data structures: linear listsToniyaP1
ย 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0BG Java EE Course
ย 
Python Data Types.pdf
Python Data Types.pdfPython Data Types.pdf
Python Data Types.pdfNehaSpillai1
ย 
Python Data Types (1).pdf
Python Data Types (1).pdfPython Data Types (1).pdf
Python Data Types (1).pdfNehaSpillai1
ย 
15CS664-Python Application Programming - Module 3 and 4
15CS664-Python Application Programming - Module 3 and 415CS664-Python Application Programming - Module 3 and 4
15CS664-Python Application Programming - Module 3 and 4Syed Mustafa
ย 
15CS664- Python Application Programming - Module 3
15CS664- Python Application Programming - Module 315CS664- Python Application Programming - Module 3
15CS664- Python Application Programming - Module 3Syed Mustafa
ย 

Similar to use python Problem 2. Selection Sort In this problem you will implem.pdf (20)

Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4
ย 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
ย 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
ย 
11 Introduction to lists.pptx
11 Introduction to lists.pptx11 Introduction to lists.pptx
11 Introduction to lists.pptx
ย 
Data Structure Searching.pptx
Data Structure Searching.pptxData Structure Searching.pptx
Data Structure Searching.pptx
ย 
1 D Arrays in C++
1 D Arrays in C++1 D Arrays in C++
1 D Arrays in C++
ย 
ds 2Arrays.ppt
ds 2Arrays.pptds 2Arrays.ppt
ds 2Arrays.ppt
ย 
โ€โ€chap6 list tuples.pptx
โ€โ€chap6 list tuples.pptxโ€โ€chap6 list tuples.pptx
โ€โ€chap6 list tuples.pptx
ย 
Ada notes
Ada notesAda notes
Ada notes
ย 
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHIBCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
BCA DATA STRUCTURES LINEAR ARRAYS MRS.SOWMYA JYOTHI
ย 
Python list
Python listPython list
Python list
ย 
Module III.pdf
Module III.pdfModule III.pdf
Module III.pdf
ย 
Sorting
SortingSorting
Sorting
ย 
Data structures: linear lists
Data structures: linear listsData structures: linear lists
Data structures: linear lists
ย 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0
ย 
Lect 11-12 Zaheer Abbas
Lect 11-12 Zaheer AbbasLect 11-12 Zaheer Abbas
Lect 11-12 Zaheer Abbas
ย 
Python Data Types.pdf
Python Data Types.pdfPython Data Types.pdf
Python Data Types.pdf
ย 
Python Data Types (1).pdf
Python Data Types (1).pdfPython Data Types (1).pdf
Python Data Types (1).pdf
ย 
15CS664-Python Application Programming - Module 3 and 4
15CS664-Python Application Programming - Module 3 and 415CS664-Python Application Programming - Module 3 and 4
15CS664-Python Application Programming - Module 3 and 4
ย 
15CS664- Python Application Programming - Module 3
15CS664- Python Application Programming - Module 315CS664- Python Application Programming - Module 3
15CS664- Python Application Programming - Module 3
ย 

More from sales223546

XML, XSDCreate an XML file that satisfies the following schema..pdf
XML, XSDCreate an XML file that satisfies the following schema..pdfXML, XSDCreate an XML file that satisfies the following schema..pdf
XML, XSDCreate an XML file that satisfies the following schema..pdfsales223546
ย 
Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfsales223546
ย 
Write ItemList.h and ItemList.cItemList is used to store a list .pdf
Write ItemList.h and ItemList.cItemList is used to store a list .pdfWrite ItemList.h and ItemList.cItemList is used to store a list .pdf
Write ItemList.h and ItemList.cItemList is used to store a list .pdfsales223546
ย 
Write a python script that will perform these operations procedurall.pdf
Write a python script that will perform these operations procedurall.pdfWrite a python script that will perform these operations procedurall.pdf
Write a python script that will perform these operations procedurall.pdfsales223546
ย 
Write a Python program that allows users to keep track of soccer pla.pdf
Write a Python program that allows users to keep track of soccer pla.pdfWrite a Python program that allows users to keep track of soccer pla.pdf
Write a Python program that allows users to keep track of soccer pla.pdfsales223546
ย 
Will upvote asapPlease help my code gives me incorrect val.pdf
Will upvote asapPlease help my code gives me incorrect val.pdfWill upvote asapPlease help my code gives me incorrect val.pdf
Will upvote asapPlease help my code gives me incorrect val.pdfsales223546
ย 
Who started the apple organization What were they doing at the time.pdf
Who started the apple organization What were they doing at the time.pdfWho started the apple organization What were they doing at the time.pdf
Who started the apple organization What were they doing at the time.pdfsales223546
ย 
Which supervision conditions are pertinent to these sex offenders.pdf
Which supervision conditions are pertinent to these sex offenders.pdfWhich supervision conditions are pertinent to these sex offenders.pdf
Which supervision conditions are pertinent to these sex offenders.pdfsales223546
ย 
Which of the following is a form of market participation A. The South.pdf
Which of the following is a form of market participation A. The South.pdfWhich of the following is a form of market participation A. The South.pdf
Which of the following is a form of market participation A. The South.pdfsales223546
ย 
Which of the following is a form of market participation A) the.pdf
Which of the following is a form of market participation A) the.pdfWhich of the following is a form of market participation A) the.pdf
Which of the following is a form of market participation A) the.pdfsales223546
ย 
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdf
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdfWeek 6 Class Assessment Implementation Plan for an HRD Learning Int.pdf
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdfsales223546
ย 
Water restored in parts of Tshwane after two-day outagePretoria - .pdf
Water restored in parts of Tshwane after two-day outagePretoria - .pdfWater restored in parts of Tshwane after two-day outagePretoria - .pdf
Water restored in parts of Tshwane after two-day outagePretoria - .pdfsales223546
ย 
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdf
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdfVenture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdf
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdfsales223546
ย 
using draw.io You are tasked with designing a database for a Movie.pdf
using draw.io You are tasked with designing a database for a Movie.pdfusing draw.io You are tasked with designing a database for a Movie.pdf
using draw.io You are tasked with designing a database for a Movie.pdfsales223546
ย 
Using jQuery, set up functionality to capture the forms input eleme.pdf
Using jQuery, set up functionality to capture the forms input eleme.pdfUsing jQuery, set up functionality to capture the forms input eleme.pdf
Using jQuery, set up functionality to capture the forms input eleme.pdfsales223546
ย 
using draw.io Task 3 Design an ER Diagram for a Library Management .pdf
using draw.io Task 3 Design an ER Diagram for a Library Management .pdfusing draw.io Task 3 Design an ER Diagram for a Library Management .pdf
using draw.io Task 3 Design an ER Diagram for a Library Management .pdfsales223546
ย 
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdf
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdfusing draw.io Task 2 Design an ER Diagram for a Music Streaming.pdf
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdfsales223546
ย 
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdf
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdfUnixLinux 1. Use screen shots or video to demonstrate the before an.pdf
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdfsales223546
ย 
You are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfYou are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfsales223546
ย 

More from sales223546 (19)

XML, XSDCreate an XML file that satisfies the following schema..pdf
XML, XSDCreate an XML file that satisfies the following schema..pdfXML, XSDCreate an XML file that satisfies the following schema..pdf
XML, XSDCreate an XML file that satisfies the following schema..pdf
ย 
Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdf
ย 
Write ItemList.h and ItemList.cItemList is used to store a list .pdf
Write ItemList.h and ItemList.cItemList is used to store a list .pdfWrite ItemList.h and ItemList.cItemList is used to store a list .pdf
Write ItemList.h and ItemList.cItemList is used to store a list .pdf
ย 
Write a python script that will perform these operations procedurall.pdf
Write a python script that will perform these operations procedurall.pdfWrite a python script that will perform these operations procedurall.pdf
Write a python script that will perform these operations procedurall.pdf
ย 
Write a Python program that allows users to keep track of soccer pla.pdf
Write a Python program that allows users to keep track of soccer pla.pdfWrite a Python program that allows users to keep track of soccer pla.pdf
Write a Python program that allows users to keep track of soccer pla.pdf
ย 
Will upvote asapPlease help my code gives me incorrect val.pdf
Will upvote asapPlease help my code gives me incorrect val.pdfWill upvote asapPlease help my code gives me incorrect val.pdf
Will upvote asapPlease help my code gives me incorrect val.pdf
ย 
Who started the apple organization What were they doing at the time.pdf
Who started the apple organization What were they doing at the time.pdfWho started the apple organization What were they doing at the time.pdf
Who started the apple organization What were they doing at the time.pdf
ย 
Which supervision conditions are pertinent to these sex offenders.pdf
Which supervision conditions are pertinent to these sex offenders.pdfWhich supervision conditions are pertinent to these sex offenders.pdf
Which supervision conditions are pertinent to these sex offenders.pdf
ย 
Which of the following is a form of market participation A. The South.pdf
Which of the following is a form of market participation A. The South.pdfWhich of the following is a form of market participation A. The South.pdf
Which of the following is a form of market participation A. The South.pdf
ย 
Which of the following is a form of market participation A) the.pdf
Which of the following is a form of market participation A) the.pdfWhich of the following is a form of market participation A) the.pdf
Which of the following is a form of market participation A) the.pdf
ย 
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdf
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdfWeek 6 Class Assessment Implementation Plan for an HRD Learning Int.pdf
Week 6 Class Assessment Implementation Plan for an HRD Learning Int.pdf
ย 
Water restored in parts of Tshwane after two-day outagePretoria - .pdf
Water restored in parts of Tshwane after two-day outagePretoria - .pdfWater restored in parts of Tshwane after two-day outagePretoria - .pdf
Water restored in parts of Tshwane after two-day outagePretoria - .pdf
ย 
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdf
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdfVenture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdf
Venture Investors Bet AI Can Improve Supply-Chain ManagementLogist.pdf
ย 
using draw.io You are tasked with designing a database for a Movie.pdf
using draw.io You are tasked with designing a database for a Movie.pdfusing draw.io You are tasked with designing a database for a Movie.pdf
using draw.io You are tasked with designing a database for a Movie.pdf
ย 
Using jQuery, set up functionality to capture the forms input eleme.pdf
Using jQuery, set up functionality to capture the forms input eleme.pdfUsing jQuery, set up functionality to capture the forms input eleme.pdf
Using jQuery, set up functionality to capture the forms input eleme.pdf
ย 
using draw.io Task 3 Design an ER Diagram for a Library Management .pdf
using draw.io Task 3 Design an ER Diagram for a Library Management .pdfusing draw.io Task 3 Design an ER Diagram for a Library Management .pdf
using draw.io Task 3 Design an ER Diagram for a Library Management .pdf
ย 
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdf
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdfusing draw.io Task 2 Design an ER Diagram for a Music Streaming.pdf
using draw.io Task 2 Design an ER Diagram for a Music Streaming.pdf
ย 
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdf
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdfUnixLinux 1. Use screen shots or video to demonstrate the before an.pdf
UnixLinux 1. Use screen shots or video to demonstrate the before an.pdf
ย 
You are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdfYou are task to add a yawning detection to the programme below;i.pdf
You are task to add a yawning detection to the programme below;i.pdf
ย 

Recently uploaded

8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
ย 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
ย 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
ย 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)Dr. Mazin Mohamed alkathiri
ย 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
ย 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
ย 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
ย 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
ย 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
ย 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
ย 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
ย 
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ไธญ ๅคฎ็คพ
ย 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
ย 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
ย 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
ย 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
ย 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
ย 

Recently uploaded (20)

8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
ย 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
ย 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
ย 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
ย 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ย 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
ย 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
ย 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
ย 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
ย 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
ย 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
ย 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
ย 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
ย 
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ย 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
ย 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
ย 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
ย 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
ย 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
ย 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
ย 

use python Problem 2. Selection Sort In this problem you will implem.pdf

  • 1. use python Problem 2. Selection Sort In this problem you will implement a function to sort a list of integers or floats in non-decreasing order using the selection sort algorithm. The idea of Selection of Sort is as follows. To sort a length- n list L=[L[0],,L[n1]] : 1. Find the index minIndex of smallest element in L (find the index of first occurrence if you have more than one element equal to the min). 2. Exchange L[ minIndex] (swap it) with L[0], hence now L[0] is the (a) smallest element of L, i.e., the number stored in L[0] is in its correct position in the desired sorted order 3. Find the index minIndex of the smallest element in [L[1],,L[n1]] 4. Exchange L[ minIndex] with L[1], hence now L[1] is the (a) second smallest element of L, i.e., the number stored in L[1] is in its correct position in the desired sorted order. 5. Find the index minIndex of the smallest element in [L[2],,L[n1]] 6. Exchange L[ minIndex] with L[2], hence now L[2] is the (a) third smallest element of L, i.e., the number stored in L[2] is in its correct position in the desired sorted order. 7. And so on until the whole list L is sorted You will implement this algorithm in Part (c), but first you will try it on an example in part (a) and you will implement a function to do Steps 1,3,5, in Part (b). a) Try it on an example. Illustrate the algorithm on L=[5,2,4,6,1,3]. There is no need to submit this part. b) Function to find the index of min. Implement a function index0fMin(L, start, end), which takes as input arguments a list L of integers or floats and two indices start and end such that 0 start end