Algorithm · Google · Hard
Requirements Input: an N x N board whose cells are either houses (H) or vacant locations that can hold plants (0 / O). Add flowers (F) under a row-and-column restriction: no row or column may contain more than one flower. In an alternate version, every row and every column must contain one flower, so confirm the intended version before implementation. Each house needs precisely one flower in one of its four orthogonally adjacent cells: above, below, left, or right. For the…
Checking your access…