Google Interview Question
SDE1sCountry: United States
MSB : the result of the final. If a team from the left bracket wins, put 0 in MSB. Otherwise, 1.
MSB-1 : the result of the semi-final of the left bracket.
MSB-2 : the result of the semi-final of the right bracket.
the next four bits are the results of quarter finals.
In this way, make an integer value S for scores, P for predictions.
~(S^P) shows how many predictions were correct. Just the count the 1 in ~(S^P) and that's the number of correct predictions.
Could you please explain the question? Example is plus
- qwe January 28, 2014