- #1
shayanahmad
- 2
- 0
Hello I'm having problem in solving this question with c/c++ code , please help me ?
An eccentric doctor visits his patients in order of decreasing age. Patients entering the waiting list specify not only their names but also their ages. Each time the doctor wants to visit a patient, the oldest is selected and removed from the list (so children may have to wait a very long time). Write a program, based on elementary sorting techniques to sort this list on first on Age and then on Patient ID, which this doctor can use.
Before
PatientID Name Age
P102 Arif Taj Mairza 50
P203 Sadar Khan 65
P546 Afsheen Bano 34
P605 Kai Whong 45
P340 Hanah Duong 23
P391 Usman Habib 65
P200 Alina Shah 34
After
PatientID Name Age
P203 Sadar Khan 65
P391 Usman Habib 65
P102 Arif Taj Mairza 50
P605 Kai Whong 45
P200 Alina Shah 34
P546 Afsheen Bano 34
P340 Hanah Duong 23
Solve this problem by applying four different elementary sorting techniques that are
a) Selection sort
b) Bubble sort
c) Insertion sort
d) Shell sort
An eccentric doctor visits his patients in order of decreasing age. Patients entering the waiting list specify not only their names but also their ages. Each time the doctor wants to visit a patient, the oldest is selected and removed from the list (so children may have to wait a very long time). Write a program, based on elementary sorting techniques to sort this list on first on Age and then on Patient ID, which this doctor can use.
Before
PatientID Name Age
P102 Arif Taj Mairza 50
P203 Sadar Khan 65
P546 Afsheen Bano 34
P605 Kai Whong 45
P340 Hanah Duong 23
P391 Usman Habib 65
P200 Alina Shah 34
After
PatientID Name Age
P203 Sadar Khan 65
P391 Usman Habib 65
P102 Arif Taj Mairza 50
P605 Kai Whong 45
P200 Alina Shah 34
P546 Afsheen Bano 34
P340 Hanah Duong 23
Solve this problem by applying four different elementary sorting techniques that are
a) Selection sort
b) Bubble sort
c) Insertion sort
d) Shell sort