SlideShare a Scribd company logo
a) If There is only one Element in the list then it will be the Median and another case where it
will return median is if the elements are in sorted order and we select the mid element then it will
be the median, hence in above two cases in only one single iteration we will get the median.
b) Yes if we wanted to sort the elements in ascending order and if it is the minimum element
then its position will remain unchanged and the same with if we wanted to sort in descending
order and if it is the greatest element then its position will not be changed
Solution
a) If There is only one Element in the list then it will be the Median and another case where it
will return median is if the elements are in sorted order and we select the mid element then it will
be the median, hence in above two cases in only one single iteration we will get the median.
b) Yes if we wanted to sort the elements in ascending order and if it is the minimum element
then its position will remain unchanged and the same with if we wanted to sort in descending
order and if it is the greatest element then its position will not be changed

More Related Content

More from anjaliselectionahd

Redox reactions are analogous in that they are el.pdf
                     Redox reactions are analogous in that they are el.pdf                     Redox reactions are analogous in that they are el.pdf
Redox reactions are analogous in that they are el.pdf
anjaliselectionahd
 
moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
                     moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf                     moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
anjaliselectionahd
 
mole fraction of He = mole of He total mole now.pdf
                     mole fraction of He = mole of He total mole  now.pdf                     mole fraction of He = mole of He total mole  now.pdf
mole fraction of He = mole of He total mole now.pdf
anjaliselectionahd
 
It is a molecular process involving the exchange .pdf
                     It is a molecular process involving the exchange .pdf                     It is a molecular process involving the exchange .pdf
It is a molecular process involving the exchange .pdf
anjaliselectionahd
 
Helium contains a 1s^2 orbital. .pdf
                     Helium contains a 1s^2 orbital.                  .pdf                     Helium contains a 1s^2 orbital.                  .pdf
Helium contains a 1s^2 orbital. .pdf
anjaliselectionahd
 
From the LCAO method The overlap of the 1s AO on.pdf
                     From the LCAO method The overlap of the 1s AO on.pdf                     From the LCAO method The overlap of the 1s AO on.pdf
From the LCAO method The overlap of the 1s AO on.pdf
anjaliselectionahd
 
Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+] .pdf
                     Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+]         .pdf                     Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+]         .pdf
Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+] .pdf
anjaliselectionahd
 
condense .pdf
                     condense                                      .pdf                     condense                                      .pdf
condense .pdf
anjaliselectionahd
 
Cis-trans isomers occur because it is impossible .pdf
                     Cis-trans isomers occur because it is impossible .pdf                     Cis-trans isomers occur because it is impossible .pdf
Cis-trans isomers occur because it is impossible .pdf
anjaliselectionahd
 
When a heterozygote (Aa) is not an exact intermediate between the tw.pdf
When a heterozygote (Aa) is not an exact intermediate between the tw.pdfWhen a heterozygote (Aa) is not an exact intermediate between the tw.pdf
When a heterozygote (Aa) is not an exact intermediate between the tw.pdf
anjaliselectionahd
 
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdfVolume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
anjaliselectionahd
 
Astatine is a halogen. Column VII(7) on the perio.pdf
                     Astatine is a halogen. Column VII(7) on the perio.pdf                     Astatine is a halogen. Column VII(7) on the perio.pdf
Astatine is a halogen. Column VII(7) on the perio.pdf
anjaliselectionahd
 
The use of a generic data type is preferred over using Object as a g.pdf
The use of a generic data type is preferred over using Object as a g.pdfThe use of a generic data type is preferred over using Object as a g.pdf
The use of a generic data type is preferred over using Object as a g.pdf
anjaliselectionahd
 
The Hofmann rearrangement is the organic reaction of a primary amide.pdf
The Hofmann rearrangement is the organic reaction of a primary amide.pdfThe Hofmann rearrangement is the organic reaction of a primary amide.pdf
The Hofmann rearrangement is the organic reaction of a primary amide.pdf
anjaliselectionahd
 
RainFall.java public class RainFall {    private double months.pdf
RainFall.java public class RainFall {    private double months.pdfRainFall.java public class RainFall {    private double months.pdf
RainFall.java public class RainFall {    private double months.pdf
anjaliselectionahd
 
Proximal convoluted tubule performs absorption of majority of water .pdf
Proximal convoluted tubule performs absorption of majority of water .pdfProximal convoluted tubule performs absorption of majority of water .pdf
Proximal convoluted tubule performs absorption of majority of water .pdf
anjaliselectionahd
 
Please find my implementationpublic KeyedItem remove() { DO.pdf
Please find my implementationpublic KeyedItem remove() { DO.pdfPlease find my implementationpublic KeyedItem remove() { DO.pdf
Please find my implementationpublic KeyedItem remove() { DO.pdf
anjaliselectionahd
 
Oxidation means loss of electrons.Metals are electropositive and l.pdf
Oxidation means loss of electrons.Metals are electropositive and l.pdfOxidation means loss of electrons.Metals are electropositive and l.pdf
Oxidation means loss of electrons.Metals are electropositive and l.pdf
anjaliselectionahd
 
Mutualism    1. Two organisms live together and both gain from that.pdf
Mutualism    1. Two organisms live together and both gain from that.pdfMutualism    1. Two organisms live together and both gain from that.pdf
Mutualism    1. Two organisms live together and both gain from that.pdf
anjaliselectionahd
 
a) The area of a disk of radius 1 is Pi.We need the integral over .pdf
a) The area of a disk of radius 1 is Pi.We need the integral over .pdfa) The area of a disk of radius 1 is Pi.We need the integral over .pdf
a) The area of a disk of radius 1 is Pi.We need the integral over .pdf
anjaliselectionahd
 

More from anjaliselectionahd (20)

Redox reactions are analogous in that they are el.pdf
                     Redox reactions are analogous in that they are el.pdf                     Redox reactions are analogous in that they are el.pdf
Redox reactions are analogous in that they are el.pdf
 
moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
                     moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf                     moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
moles NH4NO3 = 2.57 g 80.04 gmol=0.0321 moles H.pdf
 
mole fraction of He = mole of He total mole now.pdf
                     mole fraction of He = mole of He total mole  now.pdf                     mole fraction of He = mole of He total mole  now.pdf
mole fraction of He = mole of He total mole now.pdf
 
It is a molecular process involving the exchange .pdf
                     It is a molecular process involving the exchange .pdf                     It is a molecular process involving the exchange .pdf
It is a molecular process involving the exchange .pdf
 
Helium contains a 1s^2 orbital. .pdf
                     Helium contains a 1s^2 orbital.                  .pdf                     Helium contains a 1s^2 orbital.                  .pdf
Helium contains a 1s^2 orbital. .pdf
 
From the LCAO method The overlap of the 1s AO on.pdf
                     From the LCAO method The overlap of the 1s AO on.pdf                     From the LCAO method The overlap of the 1s AO on.pdf
From the LCAO method The overlap of the 1s AO on.pdf
 
Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+] .pdf
                     Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+]         .pdf                     Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+]         .pdf
Ecell=E(nought) -RT(2F)ln[Mg2+][Zn2+] .pdf
 
condense .pdf
                     condense                                      .pdf                     condense                                      .pdf
condense .pdf
 
Cis-trans isomers occur because it is impossible .pdf
                     Cis-trans isomers occur because it is impossible .pdf                     Cis-trans isomers occur because it is impossible .pdf
Cis-trans isomers occur because it is impossible .pdf
 
When a heterozygote (Aa) is not an exact intermediate between the tw.pdf
When a heterozygote (Aa) is not an exact intermediate between the tw.pdfWhen a heterozygote (Aa) is not an exact intermediate between the tw.pdf
When a heterozygote (Aa) is not an exact intermediate between the tw.pdf
 
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdfVolume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
Volume of water = masssolubility of calcium phosphate= 13.41 x 1.pdf
 
Astatine is a halogen. Column VII(7) on the perio.pdf
                     Astatine is a halogen. Column VII(7) on the perio.pdf                     Astatine is a halogen. Column VII(7) on the perio.pdf
Astatine is a halogen. Column VII(7) on the perio.pdf
 
The use of a generic data type is preferred over using Object as a g.pdf
The use of a generic data type is preferred over using Object as a g.pdfThe use of a generic data type is preferred over using Object as a g.pdf
The use of a generic data type is preferred over using Object as a g.pdf
 
The Hofmann rearrangement is the organic reaction of a primary amide.pdf
The Hofmann rearrangement is the organic reaction of a primary amide.pdfThe Hofmann rearrangement is the organic reaction of a primary amide.pdf
The Hofmann rearrangement is the organic reaction of a primary amide.pdf
 
RainFall.java public class RainFall {    private double months.pdf
RainFall.java public class RainFall {    private double months.pdfRainFall.java public class RainFall {    private double months.pdf
RainFall.java public class RainFall {    private double months.pdf
 
Proximal convoluted tubule performs absorption of majority of water .pdf
Proximal convoluted tubule performs absorption of majority of water .pdfProximal convoluted tubule performs absorption of majority of water .pdf
Proximal convoluted tubule performs absorption of majority of water .pdf
 
Please find my implementationpublic KeyedItem remove() { DO.pdf
Please find my implementationpublic KeyedItem remove() { DO.pdfPlease find my implementationpublic KeyedItem remove() { DO.pdf
Please find my implementationpublic KeyedItem remove() { DO.pdf
 
Oxidation means loss of electrons.Metals are electropositive and l.pdf
Oxidation means loss of electrons.Metals are electropositive and l.pdfOxidation means loss of electrons.Metals are electropositive and l.pdf
Oxidation means loss of electrons.Metals are electropositive and l.pdf
 
Mutualism    1. Two organisms live together and both gain from that.pdf
Mutualism    1. Two organisms live together and both gain from that.pdfMutualism    1. Two organisms live together and both gain from that.pdf
Mutualism    1. Two organisms live together and both gain from that.pdf
 
a) The area of a disk of radius 1 is Pi.We need the integral over .pdf
a) The area of a disk of radius 1 is Pi.We need the integral over .pdfa) The area of a disk of radius 1 is Pi.We need the integral over .pdf
a) The area of a disk of radius 1 is Pi.We need the integral over .pdf
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 

a) If There is only one Element in the list then it will be the Medi.pdf

  • 1. a) If There is only one Element in the list then it will be the Median and another case where it will return median is if the elements are in sorted order and we select the mid element then it will be the median, hence in above two cases in only one single iteration we will get the median. b) Yes if we wanted to sort the elements in ascending order and if it is the minimum element then its position will remain unchanged and the same with if we wanted to sort in descending order and if it is the greatest element then its position will not be changed Solution a) If There is only one Element in the list then it will be the Median and another case where it will return median is if the elements are in sorted order and we select the mid element then it will be the median, hence in above two cases in only one single iteration we will get the median. b) Yes if we wanted to sort the elements in ascending order and if it is the minimum element then its position will remain unchanged and the same with if we wanted to sort in descending order and if it is the greatest element then its position will not be changed