Available question text
Given positions of removable interior horizontal and vertical fences (with the outer borders fixed), choose two horizontal and two vertical lines (removing others) so the distance between the chosen horizontal lines equals the distance between the chosen vertical lines to form a square; return the maximum such square area modulo 1e9+7 or -1 if no matching side length exists.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2975. Maximum Square Area by Removing Fences From a Field
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source