Available question text
An ant starts at position 0 and takes successive signed steps from nums (positive = right, negative = left). Count how many times its cumulative position is exactly 0 after completing a step (crossing the boundary mid-step does not count).
Related questions
Continue with questions that share topics or the same question type.
- Boundary of Binary Tree
Coding · Binary Tree · Depth-First Search · Tree
- Count Ways to Build Rooms in an Ant Colony
Coding
- Find the Number of Subarrays Where Boundary Elements Are Maximum
Coding
- Out of Boundary Paths
Coding
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 3028. Ant on the Boundary
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source