This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Rate Limiter Interface | |
*/ | |
package io.aneessh18.postmaninterview; | |
public interface RateLimiter { | |
boolean isAllowed(Request request); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Operation | Start | End | |
---|---|---|---|
Create | 12:00 | 13:00 | |
Create | 12:10 | 13:00 | |
Create | 12:20 | 13:20 | |
Update | 12:00 | 13:10 | |
Create | 13:50 | 14:00 | |
Delete | 14:00 | 14:30 | |
Read | 15:00 | 16:00 | |
Delete | 11:00 | 15:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import datetime | |
from collections import defaultdict | |
supported_type_of_operations = ['CREATE', 'UPDATE', 'DELETE', 'READ'] | |
OPERATION_HEADER = 'Operation' | |
START_TIME_HEADER = 'Start' | |
END_TIME_HEADER = 'End' | |