โ† Target questions
CodingReported in a candidate post, Aug 2021

Adjacent 1s Matrix Validator

Filed under Target

The question

Given a square matrix of 0s and 1s, output -1 if there are any two 1s adjacent horizontally or vertically (not diagonally), and output 1 otherwise.

No write-up yet. Related questions below have one.

Related Target questions

Collected from public candidate posts and coding forums. Updated Nov 2026.