Question: in java please A class has 'n' students and each student appears for exactly 'k' exams. The class teacher has the list of marks scored


A class has 'n' students and each student appears for exactly 'k' exams. The class teacher has the list of marks scored by all the students and needs to identify the student with the nth Rank. Rank is the position in the sorted list of total marks, from high to low. If two students have equal total marks, their original order is maintained while sorting. Given the initial order of the marks and the required rank of the student, output the index of the chosen student by the teacher. For example, given the data for n = 3 student as performance = [[79, 89, 15], [85, 89, 92], [71, 96, 88]] and the required position be rank = 2, the student with index 2 is the answer. The total marks for each student in class are [183, 266, 255] respectively and the student with total score of 255 has a rank of 2. Function Description Function Description Complete the function findTheRank in the editor below. The function must return an integer, the index of the student at the required rank. findTheRank has the following parameter(s): performance[performance[0],...performance[n-1] [k-1]]: a 2D array of integers that denote the performance (marks) of n students in k exams rank: The required rank Constraints 1sns 10 1sks 10 1 s rank sn. Os performance[ijl s 100 (where 0 si
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
