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.
var counta = ((a[0]>b[0])?1:0)+((a[1]>b[1])?1:0) + ((a[2]>b[2])?1:0);
var countb = ((b[0]>a[0])?1:0)+((b[1]>a[1])?1:0)+((b[2]>a[2])?1:0);
return new List<int> {counta, countb};
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 →
This is much cleaner code for C#: