Compare The Triplets: Function Description
Compare The Triplets: Function Description
Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding
points on a scale from to for three categories: problem clarity , originality, and difficulty.
We define the rating for Alice's challenge to be the triplet , and the rating for Bob's
challenge to be the triplet .
Your task is to find their comparison points by comparing with , with , and with .
Function Description
Complete the function compareTriplets in the editor below. It must return an array of two integers, the
first being Alice's score and the second being Bob's.
Input Format
The first line contains space-separated integers, , , and , describing the respective values in
triplet .
The second line contains space-separated integers, , , and , describing the respective values
in triplet .
Constraints
Output Format
Return an array of two integers denoting the respective comparison points earned by Alice and Bob.
Sample Input 0
567
3 6 10
Sample Output 0
11
Explanation 0
In this example:
Alice's comparison score is , and Bob's comparison score is . Thus, we return the array .
Sample Input 1
17 28 30
99 16 8
Sample Output 1
21
Explanation 1