We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
To solve this problem, we need to compare the corresponding elements of Alice's and Bob's rating arrays. For each element in the arrays, we follow these rules.
If Alice's score (a[i]) is greater than Bob's score (b[i]), Alice gets 1 point.
If Alice's score is less than Bob's, Bob gets 1 point.
If their scores are equal, no points are awarded.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
To solve this problem, we need to compare the corresponding elements of Alice's and Bob's rating arrays. For each element in the arrays, we follow these rules.