### My issue

can someone explain this to me? i am not understanding this question at all. how the answer will be a[x-1]-1 ? please provide a small example

Learning course: Sorting using Python

Problem Link: CodeChef: Practical coding for everyone

can someone explain this to me? i am not understanding this question at all. how the answer will be a[x-1]-1 ? please provide a small example

Learning course: Sorting using Python

Problem Link: CodeChef: Practical coding for everyone

@siddardha5c0

It is given that the exactly x students passes the exam and the array is sorted in descending order.

and all the array elements are dinstinct.

So A0>A1>A2…>A[n-1].

now u have to find the maximum value of passing marks.

which will be the score of the student that just passes the exam -1.

Which will be A[x-1]-1.