Fair Contest
https://www.hackerrank.com/contests/codenection-2021-closed-category/challenges/fair-contest
Question
There are N students in a class with known amount of programming skills (here the skill of a person is scored with a number). Now the lecturer wants to form two programming teams in the class in such a way that their overall difference in programming skill in minimal.
Your task is to help the lecturer find the minimum such achievable difference. (Note : The sizes of groups do not have to be equal)
Input Format
The first input line has an integer N the number of students.
The next line has N integers the programming skill of each student.
Constraints
Output Format
Output one integer the minimum difference between the skills of the groups.
Sample Inputs:
Last updated