Available question text
Find an integer x in [1..n] such that the sum of 1..x equals the sum of x..n; return x or -1 if none exists. Use the closed-form triangular-number formulas to reduce the condition to a simple quadratic/arithmetical check (at most one solution 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 2485. Find the Pivot Integer
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source