At the time of logging, the timestamp can be added to a B-tree, with the nodes having the line number(i.e., number of bytes to be skipped from the beginning). At the time of searching, simple logarithmic time search will directly return the line address.
On Jul 17, 11:27 pm, vijay <[email protected]> wrote: > a file contains lot of log information in the form of DD:MM:YY > HOURS: MINUTES:SECOND: <random length text> > > GIven 2 dates, print out the lines in the file between these 2 dates. > Also optimize solution because the file may be huge and so dont go > line by line. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
