Facebook Hacker Cup, qualification, "Square finder"
✓ Published0🌍 Public
RRestuta
Last edited Nov 24, 2013
Created on Nov 24, 2013
The example shows a line-by-line solution to the Facebook Hacker Cup "Square finder" problem, reading a grid from a text file and printing either 'YES' or 'NO' for each test case. It uses Python’s built-in `open`, `readline`, and `read` functions to parse input, then iterates through nested loops to detect a contiguous square of `#` characters. The logic tracks the first sharp and its length, validating each cell against the expected square bounds with a helper function. No visualization or plotting library is used; output is plain text to the console.
AI-generated description