Skip to content

Latest commit

 

History

History
16 lines (14 loc) · 269 Bytes

Question_2620.md

File metadata and controls

16 lines (14 loc) · 269 Bytes

LeetCode Records - Question 2620 Counter

Attempt 1:

var createCounter = function(n) {
    n--;
    return function() {
        n++;
        return n;
    }
}
  • Runtime: 35 ms (Beats: 99.40%)
  • Memory: 48.21 MB (Beats: 92.32%)