Implement sliding-window rate limiter function | Atlassian Interview Question