BlackBuck interview question

Boolean matrix problem.