C Language assignment.
Good day to all MPGH coders. I've came across a problem in my C language assignment where I have to sort arrays from highest to lowest with the corresponding year for a selected 'hospital type'. But I have the same data for some for some of the years and when I build the program, the hospital with the same data looped many times but still displays the correct answer.
What it is suppose to display with different data:
What is displayed with similar data:
Please guys, I need your help!
I don't understand the full task, i don't understand what is the expected output and i don't see how i can help on your "sorting" if there is no code to take a look in.
What you expect here now exactly?
So sorry for the lack of information. The task I had to do was to display the highest to lowest hospital bed available and corresponding year for a selected
This was my 2D array in visual studios https://imgur.com/a/kV5yuHy
This was the data I was given https://imgur.com/a/7sVm7WZ
This is my function broken down into two images due to lack of space
https://imgur.com/a/r8jsrIT and https://imgur.com/a/eaR90Zk
Are you required to implement a stable sort, or is an unstable sort fine as well? A stable sort preserves the order of elements in when they are the same, unstable *might* change the order.
I think a stable sort is needed
I think you should do your own homework