Answer to Question #319444 in C for Mohammed

Question #319444

Representatives




The principal of a school wants to speak with some of the students to as the overall development including studies. Mont of the teachers were selecting the toppers of their classes but Mr. Sam thought of an idea to select the bunch of students who did not have much difference in their marks so that he gains the reputation of a teacher who teaches well to the whole class and not just to a bunch of brilliant students.You are required to help Mr Sam in selecting K students that can speak with the principal from his class. You need to return an integer array representing the marks of the selected students sorted in ascending order.








Output Specification:




Return an integer array containing the marks of K selected students sorted in ascending order








Example 1:




input1: 10




input2: {950,477, 55, 602,881,302,859,438,551,382}




input3: 1



Output: {950}







1
Expert's answer
2022-03-28T08:03:46-0400

The answer to your question is provided in the image:

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS