1. You are provided with marks of N students in Physics, Chemistry and Maths. Perform the following 3 operations: a). Sort the students in Ascending order of their Physics marks. b). Once this is done, sort the students having same marks in Physics in the descending order of their Chemistry marks. c). Once this is also done, sort the students having same marks in Physics and Chemistry in the ascending order of their Maths marks. 2. Your task is to complete the function customSort() which takes phy[], chem[], math[] . The function sorts the marks in the described order and the final changes should be made in the given arrays only.
Input Format
Input is managed for you
Output Format
Output is managed for you
Constraints
1 <= N <= 10000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
10 14 1 10 3 4 2 1 10 1 11 5 12 9 6 3 10 2 9 14 10 12 3 6 5 2 10 16 32 10 4
Output
1 14 10 1 12 3 1 2 16 2 10 10 3 6 5 4 3 2 10 9 6 10 9 32 11 10 4 14 5 12