Available question text
Return a function (closure) that captures an initial integer n and, on each invocation, returns n for the first call and increments by 1 on every subsequent call, producing the sequence n, n+1, n+2, ... .
Related questions
Continue with questions that share topics or the same question type.
- Counter II
Coding
- Design Hit Counter
Coding · Array · Binary Search · Data Stream
- Implement Chat Event Counter
Coding
- 0/1 Knapsack Problem with Time Complexity Optimization
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 2620. Counter
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source