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.
Im confused, for the other answers how I'm reading this would work is essentially;Say these are both going to equal true, if (a0 > b0) you get aliceScore = 1. And then when you go to the next if (a1 > b1) you get aliceScore = 1 again. Instead of aliceScore += 1; Can you help me understand that part. Basically I'm not understanding where is the (if true +1), I'm only seeing (if true set it to 1).
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 →
Im confused, for the other answers how I'm reading this would work is essentially;Say these are both going to equal true, if (a0 > b0) you get aliceScore = 1. And then when you go to the next if (a1 > b1) you get aliceScore = 1 again. Instead of aliceScore += 1; Can you help me understand that part. Basically I'm not understanding where is the (if true +1), I'm only seeing (if true set it to 1).