Write a function that returns a function that counts the number of times it is invoked. Example:
>> h = counter; >> h() ans = 1 >> h() ans = 2 >> h() ans = 3
Note: your solution cannot use persistent variables.
solution which does not use any nested function ;)
3875 Solvers
Calculate the Levenshtein distance between two strings
303 Solvers
Back to basics 12 - Input Arguments
467 Solvers
125 Solvers
Determine the number of odd integers in a vector
320 Solvers