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
|
4303 Discussions
|
Please Login in order to post a comment
*KOTLIN
var alice : Int = 0 var bob: Int = 0
fun compareTriplets(a: Array, b: Array): Array { for(i in 0..2){ if(a[i]>b[i]){ alice++ }else if(a[i]==b[i]){ }else{ bob++ }
}
return arrayOf(alice,bob) }
Language: JAVA 15
My c# sol:
Em python: compareTriplets