Google·Software Engineer·Technical Phone Screen
- Given an N x N grid where some cells contain houses ('H') and others are empty ('0'), place exactly one flower ('F') in each row and each column such that every house has at least one flower in a directly adjacent cell. Return any valid arrangement.
“The moment I saw 'one per row, one per column' I just thought N-Queens and went straight to DFS with backtracking.”