Skip to content

Instantly share code, notes, and snippets.

@aneessh18
aneessh18 / RateLimiter.java
Created April 19, 2024 11:55
Rate Limiter Module
/*
Rate Limiter Interface
*/
package io.aneessh18.postmaninterview;
public interface RateLimiter {
boolean isAllowed(Request request);
}
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
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'