posted 4 years ago
Hi,
I might be rather stupid here, but I am trying to find way to write a method that will return the number of request in a specific timeframe. The number of requests are in an Array in this form:
This means that there are 4 requests that arrive at second 1 and 2 at second 2. My approach would be to basically work out the duplicates that there are in the array (so basically saying there are 4 occurrences of 1), but then somehow I am not sure how to include the time aspect. I am really looking for some advice on the algorithm, not a proper solution.
Thank you