Problem of the Day
Tuesday, October 27, 2026
Problem:
The complex boolean expression shown here includes int values n1, n2, and n3.
!(n1 >= n2 || !(n3 < 7))
Which of the following expressions represents a valid simplification of the expression above?
!n1 >= !n2 && !n3 >= 7n1 < n2 || n3 < 7n1 < n2 || n3 > 7n1 < n2 && n3 < 7
The correct answer is d. The initial ! is distributed to each inner boolean expression, with a corresponding change from || to && according to DeMorgan's Law. The comparator in the first comparison changes to <, and the two 'not' operations cancel in the second comparison, leaving us with n3 < 7.