Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose you are given a task to rank the students. You have gotten the marks and id of the students. Now your task is to
Suppose you are given a task to rank the students. You have gotten the marks and id of the students. Now your task is to rank the students based on their marks using a sorting algorithm. However, you have to keep in mind that your sorting algorithms perform the minimum number of swapping operations. Input: The first line of the input file will contain an integer N(1N1000). The second line will contain N integers, representing the Student ID, Si(1Si1000 ). The next line will contain the N integer, Sm ( 1Sm1000 ), which denotes the obtained mark of the corresponding students. Output: You have to show the Student Id and obtained marks in descending order based on their obtained mark. If two or more students get the same mark, then students with the lower ID will get prioritized. See the input and output for a better understanding
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started