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.
I know this is late but in C++ booleans are defined as 0 or 1. In C++ you can write a conditional statement like if(0){ {// The condition is false} if(1){// the condition is true.} As (a1 > b1) stands is a boolean but by multiplying my 1 will cast the result to a int.
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 →
I know this is late but in C++ booleans are defined as 0 or 1. In C++ you can write a conditional statement like if(0){ {// The condition is false} if(1){// the condition is true.} As (a1 > b1) stands is a boolean but by multiplying my 1 will cast the result to a int.