2676. Throttle
Hints
Hint 1
Store a variable for currArguments.
Hint 2
If no timeout is in progress, immediately execute the function and create a timeout. If a timeout is in progress, set the currArguments to the new arguments.
Hint 3
When the timeout is done: if currArguments is null, do nothing. Otherwise, execute the function with currArguments and create another timeout.
Preparing judge…