Write an API to return true or false as per the rate limiting criteria.
Anonymous
I started with different approaches like token assignment, leaky bucket, sliding window. And then implemented the sliding window approach using Java and it was working. Even interviewer asked to execute the test cases as well. In one test case my code was failing which I fixed as well but as a feedback I have received that I were unable to debug the code, Code was not readable, Test cases was not executed etc. I have an advice here for HR, they must have start collecting the code so that they can cross review with other interviewer to decide whether candidate is not good or interviewer has some issue.
Check out your Company Bowl for anonymous work chats.