@sharad

Are we looking for more of time efficiency or space? or Both?
A time efficient solution is to build a Trie while traversing the
first file (this will take space) and search it while traversing the
second log. While we traverse the second log file and search for a
username in built trie (from first log file) we can delete the entry
from the Trie if a match if found. So if all entrie from Trie are
deleted, no need to proceed further through second log, as there
cannot be an new match.

@all,

If we have better / newer approach, please discuss here.

Thanks,
Sourav Sain

On Jun 26, 8:27 pm, Anil C R <[email protected]> wrote:
> lol!
> Anil
>
> On Sat, Jun 26, 2010 at 5:49 PM, harit agarwal <[email protected]>wrote:
>
> > in linux
> > use
> > comm -12 log1 log2
>
> > --
> > 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]<algogeeks%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/algogeeks?hl=en.

-- 
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.

Reply via email to