Hey guys,
I was wondering if there was an efficient way of reading lines from multiple files and writing to a new file in lexicographic order.
I was thinking I would do:
- Read individual file store line in set. (Since, don't want to write duplicates)
- Use collections sort to write to new file.
Concerns:
- Would this still work if every file is huge ?
- What if there are a large number of files ?
- Would MultiThreading help ?
Thanks for the help!