Salesforce software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.
No verified questions yet for Salesforce.
int timestamps representing the arrival times of API requests and an integer windowSize, your task is to determine the maximum number of API requests that can be handled within any windowSize seconds.Method Signature:def maxRequestsWithinWindow(timestamps: List[int], windowSize: int) -> int:Example 1:timestamps = [1, 2, 3, 5, 6]4timestamps = [1, 3, 6, 8, 10]31 <= len(timestamps) <= 10^50 <= windowSize <= 10^60 <= timestamps[i] <= 10^6Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free