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.
- Prepare
- Algorithms
- Warmup
- Compare the Triplets
- Discussions
Compare the Triplets
Compare the Triplets
Sort by
recency
|
4211 Discussions
|
Please Login in order to post a comment
C#
function compareTriplets(a: number[], b: number[]): number[] { let alice = 0; let bob = 0; for(let i=0; i < 3 ; i++){ if(a[i]>b[i]) alice++ if(a[i] } return [alice,bob] }
I am really interested to know if there's any better solution than what mentioned below:
Hi everyone! Here's my Java Solution for the challenge. If anyone wants to chat about programming or other things, just reach out!
https://github.com/eduardocintra/hacker-rank-solutions/blob/master/src/br/com/eduardocintra/easy/comparethetriplets/CompareTheTriplets.java
JAVA
public static List compareTriplets(List a, List b) {