|
-
September 28th, 2015, 09:43 AM
#4
Re: find closest date in sorted array of dates if required date is missing
 Originally Posted by misharica
So actual problem is that I have to find a date with minimum possible readings.
Okay, since the dates are sorted you can find the lower limit by way of a binary search. With 12000 dates it will be 14 accesses (2^14 = 16384) at the most.
Then dates follow in order from lower to upper limit so the number of additional accesses will be the same as the number of dates inside the range.
Last edited by tiliavirga; September 29th, 2015 at 04:46 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|