Showing posts with label boolean-logic. Show all posts
Showing posts with label boolean-logic. Show all posts

Sunday, May 27, 2012

Check if at least 2 out of 3 booleans is true


An interviewer recently asked me this question: given 3 boolean variables a, b, c, return true if at least 2 out of the 3 are true.